LEFT: return a number of characters from the left-hand side of a string : LEFT « String Functions « SQL Server / T-SQL






LEFT: return a number of characters from the left-hand side of a string

1> -- LEFT: return a number of characters from the left-hand side of a string.
2>
3> DECLARE @LEFT_STRING char(100)
4> SET @LEFT_STRING = "Welcome123456789"
5>
6> SELECT LEFT(@LEFT_STRING,10)
7> GO

----------
Welcome123

(1 rows affected)
1>

           
       








Related examples in the same category

1.LEFT(): returns characters from the left-most part of the string, counting characters to the right
2.Left: get string to the left
3.LEFT(Name,1)