How to Use substring()

In MS-SQL the substring function extracts the specified amount of characters from a string.

select substring('hello how are you', 7,3) as substring
substring
how

The second parameter specifies the position where the substring starts and the third parameter is the length of the substring to extract. The three parameters are mandatory.

IN THIS PAGE