LTRIM(string, [character]);
RTRIM(string, [character]);
BTRIM(string, [character]);Code language: SQL (Structured Query Language) (sql)
SELECT
TRIM (
LEADING
FROM
' PostgreSQL TRIM'
),
TRIM (
TRAILING
FROM
'PostgreSQL TRIM '
),
TRIM (' PostgreSQL TRIM ');
Code language: SQL (Structured Query Language) (sql)
SELECT
TRIM (
LEADING '0'
FROM
CAST (0009100 AS TEXT)
); -- 9100Code language: SQL (Structured Query Language) (sql)