SUBSTRING SQL Function (SQL-99 compatible)
Syntax
SUBSTRING (char_exp FROM start_position [ FOR length ])
Description
The scalar function SUBSTRING returns the substring of a character string corresponding to the first argument starting at start_position and length characters long.
The third argument length is optional. If the length is not specified the substring starting at start_position up to the end of the char_exp is returned.
Example
SELECT SUBSTRING( 'FairCom Corporation' FROM 1 FOR 7)
From customers ;
FAIRCOM
------
FairCom
1 record selected
Details
Note: SQL-99 compatible