1LTRIM(string, [character]);
2RTRIM(string, [character]);
3BTRIM(string, [character]);Code language: SQL (Structured Query Language) (sql)
1SELECT
2 TRIM (
3 LEADING
4 FROM
5 ' PostgreSQL TRIM'
6 ),
7 TRIM (
8 TRAILING
9 FROM
10 'PostgreSQL TRIM '
11 ),
12 TRIM (' PostgreSQL TRIM ');
13Code language: SQL (Structured Query Language) (sql)
1SELECT
2 TRIM (
3 LEADING '0'
4 FROM
5 CAST (0009100 AS TEXT)
6 ); -- 9100Code language: SQL (Structured Query Language) (sql)