MSSQLString FunctionsLEN
RIGHT

LENString Functions

DATALENGTH

Returns the character count (excluding trailing spaces).

Syntax

LEN(str)

Example

Enter values below to update the example in real time.

product_name
name_len
products
SELECT product_name, LEN(product_name) AS name_len
FROM products
WHERE LEN(product_name) > 20;