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






This can be from 1 character up to all the characters in the string.
5>
6> DECLARE @LEFT_STRING char(100)
7> SET @LEFT_STRING = "www.java2s.com, www.java2s.com, java2s"
8> SELECT LEFT(@LEFT_STRING,10)
9> GO

--------------------
www.java2s

(1 rows affected)








12.6.LEFT
12.6.1.LEFT function returns a number of characters from the left-hand side of a string.
12.6.2.select LEFT('SQL Server', 3)
12.6.3.Taking the Leftmost or Rightmost Part of a String
12.6.4.A SELECT statement that uses the LEFT function
12.6.5.Use LEFT and RIGHT to get sub value from a column
12.6.6.LEFT(CompanyName, 1) and like
12.6.7.How to use the string functions to parse a string