MySQL - What is the difference between CHAR_LENGTH and LENGTH?

What is the difference between CHAR_LENGTH and LENGTH?

- CHAR_LENGTH includes leading and trailing blanks and the string-termination character LENGTH excludes trailing blanks and the string-termination character. It does not exclude leading blanks.

- CHAR_LENGTH, as the name suggests, returns the number of characters / character count. The LENGTH returns the number of bytes / bytes count. To count the Latin characters, both lengths are the same. To count Unicode and other encodings, the lengths are different.
MySQL - Explain the difference between BOOL, TINYINT and BIT.
The basic difference between RPC and JMS lies in the way they message. RPC uses synchronous messaging....
MySQL ENUMs - What are ENUMs used for in MySQL?
MySQL ENUMs - Using Enum can restrict the number of values that can be allowed to go inside a table.....
MySQL Aggregate Functions - Explain MySQL Aggregate Functions.
MySQL Aggregate Functions - Aggregate functions in MySQL are a group of functions that are used to operate on a set of values.....
Post your comment