# TRIM() Function

### Description

Removes leading and trailing spaces from a string

### Syntax

```sql
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

```sql
SELECT
    TRIM(col)
FROM
    rippling.employee.Employee
LIMIT
    5;
```

Source: https://developer.rippling.com/documentation/rippling-platform/transformations/sql-reference/trim

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
