This SQLite post explains how to use the SQLite length function with syntax and examples.
The SQLite length function returns the length of the specified string (measured in characters).
The syntax for the length function in SQLite is:
length( string )
The string to return the length for.
The length function can be used in the following versions of SQLite:
Let's look at some SQLite length function examples and explore how to use the length function in SQLite.
For example:
sqlite> SELECT length('AODBA.com');
Output: 9
sqlite> SELECT length('dbd');
Output: 3
sqlite> SELECT length(32);
Output: 2
sqlite> SELECT length(NULL);
Output: NULL
sqlite> SELECT length('');
Output: 0
sqlite> SELECT length(' ');
Output: 1