Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

trim sql oracle

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'
 
PREVIOUS NEXT
Tagged: #trim #sql #oracle
ADD COMMENT
Topic
Name
4+5 =