📜  trim sql oracle - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:57.457000             🧑  作者: Mango

代码示例1
SELECT TRIM('   Exemple   ') FROM dual;                        -- 'Exemple'
SELECT LTRIM('   Exemple   ') FROM dual;                    -- 'Exemple   '
SELECT RTRIM('   Exemple   ') FROM dual;                    -- '   Exemple'
SELECT TRIM(BOTH 'x' FROM 'xxxExemplexxx') FROM dual;        -- 'Exemple'
SELECT TRIM(LEADING 'x' FROM 'xxxExemplexxx') FROM dual;    -- 'Exemplexxx'
SELECT LTRIM('xxxExemplexxx', 'x') FROM dual;                -- 'Exemplexxx'
SELECT TRIM(TRAILING 'x' FROM 'xxxExemplexxx') FROM dual;     -- 'xxxExemple'
SELECT RTRIM('xxxExemple', 'x') FROM dual;                    -- 'Exemplexxx'