December 4th, 2008

BIT_LENGTH (no. of bits)

The BIT_LENGTH function returns the number of bits contained in the value of the argument.

Format: BIT_LENGTH(expression)
Example: SELECT BIT_LENGTH('ABC') FROM TABLEA;

Result:

                   

> PostgreSQL, and Sybase support BIT_LENGTH.

> Access, DB2, MySQL, Oracle, and SQL Server don’t support BIT_LENGTH.

> Oracle uses LENGTHB.

Comments are closed.

Sorry, the comment form is closed at this time.