首页 > 代码库 > CONV()

CONV()

CONV() 用于不同进制数之间的转换

mysql> SELECT CONV(a,16,2),   # 将16进制的a转换为2进制    -> CONV(15,10,2),           # 将10进制的15转换为2进制    -> CONV(15,10,8),           # 将10进制的15转换为8进制    -> CONV(15,10,16);          # 将10进制的15转换为16进制+----------------+---------------+---------------+----------------+| CONV(a,16,2) | CONV(15,10,2) | CONV(15,10,8) | CONV(15,10,16) |+----------------+---------------+---------------+----------------+| 1010           | 1111          | 17            | F              |+----------------+---------------+---------------+----------------+

 

 

 

   

CONV()