Description
Removes leading and trailing spaces from a string
Syntax
TRIM([LEADING | TRAILING | BOTH] [characters] FROM string)
Parameters
| Parameter | Description | Data Type | Required |
|---|---|---|---|
| string | String value | String | Yes |
Notes
- If no direction (LEADING, TRAILING, BOTH) is specified, BOTH is assumed
- If no characters are specified, it trims spaces (' ')
Example
SELECT
TRIM(col)
FROM
rippling.employee.Employee
LIMIT
5;