This topic describes how to use the string function TRIM in Realtime Compute.

Syntax

VARCHAR TRIM( VARCHAR x)

Input parameters

Parameter Data type
x VARCHAR

Description

Removes leading or trailing characters of a string. This function is often used to remove leading or trailing spaces.

Example

  • Test statements
    SELECT TRIM('   Sample   ') as result
    FROM   T1;    
  • Test results
    result (VARCHAR)
    Sample