What is SQL TRIM?
The SQL Trim feature is are functions (LTRIM and RTRIM) that remove leading and trailing blanks from a string.
For example, the function LTRIM(' Minnesota') returns:
Why Use SQL TRIM?
The SQL Trim functions (LTRIM and RTRIM) are useful in cleansing data that contains leading and trailing blanks.
How To Use SQL TRIM
SQL TRIM is used as follows.
SQL TRIM Syntax
SQL TRIM Example
The LTRIM function removes the leading blanks in the string ' Bob'.
This SQL Statement with LTRIM is executed:
Here is the result.