SUBSTRING
Substring returns the part of the string from a given character expression. The general syntax of Substring is as follows :
SUBSTRING(expression, start, length)
Here the function gets the string from start to length. Let us take an example below:
SELECT OUT = SUBSTRING('abcdefgh', 2, 3)
The output will be "bcd".
Substring returns the part of the string from a given character expression. The general syntax of Substring is as follows :
SUBSTRING(expression, start, length)
Here the function gets the string from start to length. Let us take an example below:
SELECT OUT = SUBSTRING('abcdefgh', 2, 3)
The output will be "bcd".
Note : substring also works on ntext, VARCHAR, CHAR etc.
No comments:
Post a Comment