MySQL SUBSTRING

語法:

SUBSTRING([string], [start], [length]) 或 SUBSTRING([string] FROM [start] FOR [length])

如:

SELECT SUBSTRING("This is a string", 5, 3) as Result;

SELECT SUBSTRING('This is a string' FROM 2 FOR 3) as Result;

SUBSTRING(), SUBSTR(), MID()三個function等