Retrieve the number of characters in a string.
SELECT Len(“SQL Tutorial”) AS LengthOfString; |
The Len() function provides the number of characters in a string.
Len(string/varname) |
Parameter |
Description |
string/varname |
Required. Specifies the string or variable name for which to retrieve the length. |
Works in: |
From Access 2000 |
Retrieve the number of characters in the text found in the “CustomerName” column.
SELECT Len(CustomerName) AS LengthOfString FROM Customers; |