SUBSTRING

{SUBSTRING | SUBSTR} (string, startInt [, lengthInt])

Description

Returns a substring of a string starting at a position. If the start index is negative, then the start index is relative to the end of the string. The length is optional. Also supported is: SUBSTRING(string [FROM start] [FOR length]).

Examples

SELECT SUBSTR(name, 2, 5) FROM Players;