Export (0) Print
Expand All
Expand Minimize

LEN (SQL Server Compact Edition)

Returns the number of characters, instead of the number of bytes, of the given string expression, excluding trailing blanks.


LEN ( string_expression ) 

string_expression

The string expression to be evaluated. The string_expression argument can be any data type that can be implicitly converted to nvarchar. Binary expressions can also be supplied as arguments, in which case the number of bytes is returned.

The following example returns the company names listed in the Customers table, along with the number of characters in the company name.

SELECT CompanyName, LEN(CompanyName)
FROM Customers
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft