
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MySQL Function to Determine String Length in Bits
MySQL BIT_LENGTH() string function is used to get the length of the string in bits.
Syntax
BIT_LENGTH(Str)
Here Str, the argument of BIT_LENGTH() function, is the string whose BIT_LENGTH value is to be retrieved. Str can be a character string or number string. If it is a character string then it must be in quotes.
Example
mysql> Select BIT_LENGTH('New Delhi'); +-------------------------+ | BIT_LENGTH('New Delhi') | +-------------------------+ | 72 | +-------------------------+ 1 row in set (0.00 sec) mysql> select BIT_LENGTH(123456); +--------------------+ | BIT_LENGTH(123456) | +--------------------+ | 48 | +--------------------+ 1 row in set (0.00 sec)
Advertisements