ORACLE 进制转换函数

SQL> SELECT to_char(123, 'xxx')               "10进制转16进制",
  2         to_number('7b', 'xxx')                   "16进制转10进制",
  3         bin_to_num(1, 1, 1, 1, 0, 1, 1)       "2进制转10进制",
  4         ascii('A')                                         "字符转10进制",
  5         CHR(65)                                         "整数转字符"
  6  FROM DUAL;

 

 10进制转16进制 10进制转16进制      2进制转10进制   字符转10进制    整数转字符
--------------         --------------        -------------    ------------      ----------
  7b                                123                    123           65         A

你可能感兴趣的:(oracle,sql)