Examples

Example 2 – Returns the two leftmost characters of the character
string “abcdef”:

select left("abcdef", 2)
---------
ab
(1 row(s) affected)

Usage

character_expression can
be of any datatype (except text or image)
that can be implicitly converted to varchar or nvarchar. character_expression can
be a constant, variable, or a column name. You can explicitly convert character_expression using convert.

left is equivalent to substring(character_expression, 1, integer_expression).