Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

Len

Example

Retrieve the number of characters in a string.

SELECT Len(“SQL Tutorial”AS LengthOfString;

Definition and Usage

The Len() function provides the number of characters in a string.

Syntax

Len(string/varname)

Parameter Values

Parameter

Description

string/varname

Required. Specifies the string or variable name for which to retrieve the length.

Technical Details

Works in:

 From Access 2000

More Examples

Example

Retrieve the number of characters in the text found in the “CustomerName” column.

SELECT Len(CustomerName) AS LengthOfString
FROM Customers;