
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
MySQL BIT_LENGTH() function is used for which purpose?
Forgetting the length of the string in bits, MySQL BIT_LENGTH() string function can be used. Its syntax is 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('tutorialspoint'); +------------------------------+ | BIT_LENGTH('tutorialspoint') | +------------------------------+ | 112 | +------------------------------+ 1 row in set (0.00 sec) mysql> Select BIT_LENGTH(2365489); +---------------------+ | BIT_LENGTH(2365489) | +---------------------+ | 56 | +---------------------+ 1 row in set (0.00 sec)
- Related Articles
- Which function is a synonym of MySQL LENGTH() function?
- What is the purpose of using MySQL CHAR_LENGTH() function? Which function is the synonym of it?
- What is the purpose of MySQL TRIM() function?
- For timestamp, which datatype is used in MySQL?
- Which kind of mirror is used in the headlights of a car? Why is it used for this purpose?
- Why is teflon used as tape for sealing purpose?
- Which PHP function is used to select a MySQL database?
- Which PHP function is used to create a MySQL table?
- Which MySQL data type is used for long decimal?
- What is meant by incineration? For what purpose is it used?
- Which MySQL function can be used to find out the length of the string in bits?
- Which function in MySQL is used to reverse a particular string?
- Which PHP function is used to disconnect from MySQL database connection?
- Which PHP function is used to delete an existing MySQL table?
- What is Maxwell's corkscrew rule? For what purpose is it used?

Advertisements