get length of string in mysql code example
Example 1: mysql string length
-- Relevant for MySQL only
-- syntax
LENGTH(<your-string>)
-- example
LENGTH('CountCharacters') -- OUTPUT: 15
123456789012345
-- example with query
SELECT 'CountCharacters',LENGTH('CountCharacters')
FROM DUAL;
-- OUTPUT: CountCharacters, 15
Example 2: count characters of string mysql
SELECT
LENGTH(<column_name>) AS length
FROM <table>
WHERE...