MySQL CHAR_LENGTH Function Returns No Parameter



In this case, it means we are providing an empty string as an argument to the CHAR_LENGTH() function. It will return 0 on providing empty string because there are no characters to be counted by CHAR_LENGTH() function.

Example

mysql> Select CHAR_LENGTH('');
+-----------------+
| CHAR_LENGTH('') |
+-----------------+
| 0               |
+-----------------+
1 row in set (0.00 sec)
Updated on: 2020-06-20T07:48:07+05:30

171 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements