sql substring where code example
Example 1: sql substring
-- substr(string, start, [, length ])
SELECT substr('Hello World', 4, 5) ; -- lo Wo
SELECT substr('Hello World', 4); -- lo World
SELECT substr('Hello World', -3); -- rld
Example 2: substring sql
SELECT SUBSTRING('SQL Tutorial', 4, (LENGTH('SQL Tutorial'))
AS LastCharactersString;
//Result -> Tutorial