String Functions
SUBSTRING
SUBSTR is an alias for SUBSTRING. Learn more at SUBSTR documentation.
Overview
The SUBSTRING() function lets you extract a part of a string and return that substring.
Syntax
Here are the 2 basic syntaxes of the SUBSTRING() function in Oxla:
2 Arguments
SUBSTRING( string, start_position )
3 Arguments
SUBSTRING(string, start_position, length)
Both syntaxes will have input and return of type
string
.Example
The following example uses the SUBSTRING()
function to extract the first 7 characters from the string.
SELECT SUBSTRING('OxlaDocumentation', 1, 7);
It will display the substring from position 6 output as shown below:
substring
-----------
OxlaDoc