Skip
Arish's avatar

106. LENGTH Function


LENGTH Function

Returns the number of characters in a string.

Syntax

sql
1SELECT LENGTH(column) FROM table;

Example

sql
1SELECT name, LENGTH(name) AS name_length FROM students;
namename_length
Alice5
Bob3