sql right characters
snippet in sql

sql right characters

user377

-- For Oracle only

-- syntax 
SUBSTR(<main-string>,-<number-of-characters>)

-- example 
SUBSTR('Useless stuff',-9) -- OUTPUT: ess stuff

-- practical example
SELECT SUBSTR('Useless stuff',-9)
FROM DUAL;

RIGHT tsql

user9582


  SELECT RIGHT('SQL Tutorial', 3) AS ExtractString;