In this post explains how to use the LEN function in SQL Server (Transact-SQL) with syntax and examples.
In SQL Server (Transact-SQL), the LEN function returns the length of the specified string. It is important to note that the LEN function does not include trailing space characters at the end the string when calculating the length.
The syntax for the LEN function in SQL Server (Transact-SQL) is:
The string to return the length for.
The LEN function can be used in the following versions of SQL Server (Transact-SQL):
Let's look at some SQL Server LEN function examples and explore how to use the LEN function in SQL Server (Transact-SQL).
For example: