BIN_TO_NUM

BIN_TO_NUM is an SQL function that converts binary vector to a decimal representation. It belongs to the class of Oracle built-in functions.

Example

SELECT BIN_TO_NUM(0, 1, 1) FROM dual;

Output

6

Explanation

The BIN_TO_NUM function takes binary numbers as arguments and returns its decimal equivalent. In the provided example, binary 011 is converted to decimal, resulting in 6.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.