Mysql BIT LENGTH
From w3cyberlearnings
Contents |
MySQL BIT_LENGTH Function
This function returns the length of a string in bites. Single character is 8 bites.
Syntax BIT_LENGTH
Str: A string or character.
BIT_LENGTH(Str)
Example 1
mysql> SELECT BIT_LENGTH('g'); +-----------------+ | BIT_LENGTH('g') | +-----------------+ | 8 | +-----------------+ 1 row in set (0.00 sec)
Example 2
mysql> SELECT BIT_LENGTH('ga'); +------------------+ | BIT_LENGTH('ga') | +------------------+ | 16 | +------------------+ 1 row in set (0.00 sec)
Related Links
- ASCII
- BIN
- BIT_LENGTH
- CHAR_LENGTH
- CHAR
- CHARACTER_LENGTH
- CONCAT_WS
- CONCAT
- ELT
- EXPORT_SET
- FIELD
- FIND_IN_SET
- FORMAT
- HEX