• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / BIN_TO_NUM Function in Oracle SQL – PLSQL

BIN_TO_NUM Function in Oracle SQL – PLSQL

November 27, 2012 by techhoneyadmin

The BIN_TO_NUM Function in Oracle SQL / PLSQL is used to convert the bit vector to a number type.

Syntax for the using the BIN_TO_NUM Function in Oracle SQL / PLSQL is:

SELECT BIT_TO_NUM(expression1,expression2, . .expressionN)
FROM table_name;

expression1, expression2, . ., expressionN must be either 0 or 1 and they represent bits in a bit vector.

Examples:
Using BIN_TO_NUM Function in Oracle SQL / PLSQL SELECT statement:

SELECT  BIN_TO_NUM(1)
FROM dual;

Will return ‘1’

SELECT  BIN_TO_NUM(1,1)
FROM dual;

Will return ‘3’

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

Will return ‘7’

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

Will return ‘14’


Filed Under: function Tagged With: BINTONUMPLSQL, BIN_TO_NUM Function in oracle plsql, BIN_TO_NUM Function in oracle sql, how to use BIN_TO_NUM Function in oracle database query, how to use BIN_TO_NUM Function in oracle plsql, how to use BIN_TO_NUM Function in oracle sql, syntax and example of BIN_TO_NUM Function in oracle database query, syntax and example of BIN_TO_NUM Function in oracle plsql, syntax and example of BIN_TO_NUM Function in oracle sql, using BIN_TO_NUM Function in oracle database query, using BIN_TO_NUM Function in oracle plsql, using BIN_TO_NUM Function in oracle sql

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in