Takes one argument as an input of type BINARY or STRING and returns the number of characters, as defined by the database's collation sequence, of a specified string expression, excluding trailing blanks. The result may differ from the string’s byte length for multi-byte character sets.
BINARYand VARBINARY are also allowed, in which case LEN() returns the number of bytes of the input.
LEN is an alias of LENGTH function
LEN ( string_expr )
string_expr is the string expression to be evaluated.
Returns the characters:
select len(notes) from titles where title_id = "PC9999" ----------- 39
This function is the equivalent of CHAR_LENGTH (string_expression).
Any user can execute LEN.
ANSI SQL – Compliance level: Transact-SQL extension
Data types CHAR, NCHAR, VARCHAR, NVARCHAR.
See Chapter 4, “SQL Data Types.”
Functions “CHAR_LENGTH function [String]” and “STR_REPLACE function [String]”.
For general information about string functions, see “String functions”.