LENGTH()
function is used to find the length of a string, i.e., the number of characters in a given string. It accepts a string as a parameter. Syntax of the length function is illustrated below:
LENGTH(NULL)
, it will return NULL
.LENGTH(")
, it will return 0.LENGTH('')
, not empty or null, it will return 1 as it is not empty anymore.LENGTH()
functionLENGTH()
function to find out the length of a string text:
LENGTH()
function using columnsLENGTH()
function works on the personal_details table containing the employee’s id, first_name, last_name, and gender of a retail store as columns.