T-SQL 101: 46 Using LEFT, RIGHT, and SUBSTRING to extract substrings in SQL Server
You might need to extract part of a string from a given string. T-SQL has a number of functions to help you do that. Take a look at these examples:
LEFT, RIGHT, and SUBSTRING are all functions that return parts of strings .
In the first example, we asked for 3 characters from the left of the string so SQL Server returned ABC.
The second example shows returning 2 characters from the right of the string, so we get KL.
2019-12-02