Advertisement

Latest Post

Saturday, 1 October 2016

How to get length of a string in sql server



LEN () - Returns the length of a input value


Example: - LEN() function used on above “Employee” table with below query

SELECT LEN(Name) as NameLength, Name FROM [SQLCLR].[dbo].[Employee]

Result:-

NameLength
Name
16
Alok Kumar Singh
10
Tomas Paul
14
Cristomfer Dee
12
Niel Macengi


Government Jobs