LEN Returns the length of a string as an integer. : LEN « String Functions « SQL Server / T-SQL Tutorial






3>
4> DECLARE @LEN_STRING varchar(100)
5> SET @LEN_STRING = "www.java2s.com"
6>
7> SELECT LEN(@LEN_STRING)
8> GO

-----------
         14

(1 rows affected)








12.7.LEN
12.7.1.LEN Returns the length of a string as an integer.
12.7.2.select LEN('SQL Server')
12.7.3.select LEN(' SQL Server ') (space at both ends)
12.7.4.Determining the Number of Characters or Bytes in a String by using LEN