SUBSTRING
Extracts a substring starting at the specified position with optional length.
Category: String Functions
Syntax
sql
SUBSTRING(str FROM start)sql
SUBSTRING(str FROM start FOR length)Arguments
- string
varcharString input value. - from_pos
integerInteger input value. - count
integerInteger input value.
Returns
same as string — Returns a value with the same type as string.
Usage Notes
Canonical SQL-92 form is SUBSTRING(str FROM start FOR length). Opteryx also accepts SUBSTRING(str[, start[, length]]).