hariprasadraja
10/14/2019 - 11:28 AM

sql select string length

Saved from https://www.techonthenet.com/mysql/functions/char_length.php

Note

  • When using the CHARACTER_LENGTH function, a multi-byte character is counted as a single character.

    • The CHARACTER_LENGTH function is a synonym for the CHAR_LENGTH function.
  • When using the LENGTH function, a multi-byte character is counted as more than one byte.#

SELECT CHAR_LENGTH('techonthenet.com');
-- Result: 16

SELECT LENGTH('techonthenet.com');
-- Result: 16