1SELECT TRIM(' Exemple '); -- 'Exemple'
2SELECT LTRIM(' Exemple '); -- 'Exemple '
3SELECT RTRIM(' Exemple '); -- ' Exemple'
4SELECT TRIM(BOTH 'x' FROM 'xxxExemplexxx'); -- 'Exemple'
5SELECT TRIM(LEADING 'x' FROM 'xxxExemplexxx'); -- 'Exemplexxx'
6SELECT LTRIM('xxxExemplexxx', 'x'); -- 'Exemplexxx'
7SELECT TRIM(TRAILING 'x' FROM 'xxxExemplexxx'); -- 'xxxExemple'
8SELECT RTRIM('xxxExemple', 'x'); -- 'Exemplexxx'
1TRIM([LEADING | TRAILING | BOTH] [characters] FROM string)Code language: SQL (Structured Query Language) (sql)
1-- Syntax for SQL Server and Azure SQL Database
2TRIM ( [ characters FROM ] string )
3