sql remove characters from string left code example
Example 1: sql remove characters from string right
SELECT TRIM(' Exemple ');
SELECT LTRIM(' Exemple ');
SELECT RTRIM(' Exemple ');
SELECT TRIM(BOTH 'x' FROM 'xxxExemplexxx');
SELECT TRIM(LEADING 'x' FROM 'xxxExemplexxx');
SELECT LTRIM('xxxExemplexxx', 'x');
SELECT TRIM(TRAILING 'x' FROM 'xxxExemplexxx');
SELECT RTRIM('xxxExemple', 'x');
Example 2: sql left characters
SUBSTR(<main-string>,1,<number-of-characters>)
SUBSTR('Useless stuff',1,10)
SELECT SUBSTR('Useless stuff',1,10)
FROM DUAL;