Determining the Number of Characters or Bytes in a String by using LEN : LEN « String Functions « SQL Server / T-SQL Tutorial






3>
4> SELECT LEN(N'www.java2s.com. java2s')
5> GO

-----------
         22

(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