例如:
mysql> select conv("a",16,2); --意思就是 将16进制的‘a’转换成2进制的
+----------------+
| conv("a",16,2) |
+----------------+
| 1010 |
+----------------+
1 row in set (0.00 sec)
mysql> select ascii(‘a‘);
+------------+
| ascii(‘a‘) |
+------------+
| 97 |
+------------+
1 row in set (0.00 sec)
mysql> select bin(10);
+---------+
| bin(10) |
+---------+
| 1010 |
+---------+
1 row in set (0.00 sec)
mysql> select oct(10);
+---------+
| oct(10) |
+---------+
| 12 |
+---------+
1 row in set (0.00 sec)
mysql> select hex(10);
+---------+
| hex(10) |
+---------+
| A |
+---------+
1 row in set (0.00 sec)
mysql> select char(77,121,83,81,‘76‘);
+-------------------------+
| char(77,121,83,81,‘76‘) |
+-------------------------+
| MySQL |
+-------------------------+
1 row in set (0.00 sec)
mysql> select char(77,77.5,‘77.3‘);
+----------------------+
| char(77,77.5,‘77.3‘) |
+----------------------+
| MNM |
+----------------------+
1 row in set, 1 warning (0.00 sec)