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;| name | name_length |
|---|---|
| Alice | 5 |
| Bob | 3 |

Returns the number of characters in a string.
1SELECT LENGTH(column) FROM table;1SELECT name, LENGTH(name) AS name_length FROM students;| name | name_length |
|---|---|
| Alice | 5 |
| Bob | 3 |