WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

SQL LEN() Function


The LEN() Function

The LEN() work restores the length of the incentive in a content field.

SQL LEN() Syntax

SELECT LEN(column_name) FROM table_name;

Database

In this instructional exercise we will utilize the outstanding database.

Below is a determination from the "Clients" table:

CustomerID CustomerName Phone Address City Country
1

Ramonita Homan 231-596-2048 ORubaiyat Road Fantastic Rapid MI USA
2 Charles L. Emmons 507-256-8113 Rosewood Court Clarks Grove MN USA
3 Ruth C. Dorsey 079 1763 2524 Quay Street NAILBRIDGE YO4 5SS UK
4

Evelyn B. Blacker 077 6011 6540 Wade Lane SAND HOLE YO4 5SS UK
5 Nytorpsv채gen 45 Christina Berglund Nytorpsv채gen 45 BANKERYD Sweden

SQL LEN() Example

The following SQL articulation chooses the "CustomerName" and the length of the values in the "Address" section from the "Clients" table:

Example

SELECT CustomerName,LEN(Address) as LengthOfAddress
FROM Customers;