PostgreSQL LENGTH
From w3cyberlearnings
Contents |
Postgresql length
Returns the number of character in a string.
Syntax length
length(string)
Example 1
test2=# SELECT length('apple'); length -------- 5 (1 row) test2=# SELECT length('human'); length -------- 5 (1 row)
Example 2
test2=# SELECT length(user_firstname) , test2-# user_firstname test2-# FROM profile; length | user_firstname --------+---------------- 3 | Jim 4 | king 5 | Jammi 3 | Bob | (5 rows)