字符串函数


1 row in set (0.00 sec)
1 row in set (0.01 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
数值函数

1 row in set (0.01 sec)
1 row in set (0.02 sec)
1 row in set (0.00 sec)
1 row in set (0.01 sec)
1 row in set (0.00 sec)
1 row in set (0.01 sec)
1 row in set (0.01 sec)
1 row in set (0.00 sec)
日期和时间函数

1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.02 sec)
mysql日期和时间格式


1 row in set (0.01 sec)
mysql日期间隔类型

1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
流程函数

测试数据
mysql> create table salary(userid int,salary decimal(9,2));
Query OK, 0 rows affected (0.01 sec)
mysql> insert into salary values (1,1000),(2,2000),(3,3000),(4,4000),(5,5000),(1,null);
Query OK, 6 rows affected (0.01 sec)
Records: 6 Duplicates: 0 Warnings: 0
| 1 | 1000.00 |
| 2 | 2000.00 |
| 3 | 3000.00 |
| 4 | 4000.00 |
| 5 | 5000.00 |
6 rows in set (0.00 sec)
| 1 | low |
| 2 | low |
| 3 | high |
| 4 | high |
| 5 | high |
6 rows in set (0.00 sec)
| 1 | 1000.00 |
| 2 | 2000.00 |
| 3 | 3000.00 |
| 4 | 4000.00 |
| 5 | 5000.00 |
6 rows in set (0.00 sec)
| 1 | low |
| 2 | low |
| 3 | high |
| 4 | high |
| 5 | high |
6 rows in set (0.00 sec)
| 1 | low |
| 2 | mid |
| 3 | high |
| 4 | high |
| 5 | high |
6 rows in set (0.00 sec)
其他函数

1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
1 row in set (0.00 sec)
使用inet_aton查看192.168.1.3和192.168.1.20之间有多少个ip地址
mysql> create table ipaddr (ip varchar(15));
Query OK, 0 rows affected (0.00 sec)
mysql> insert into ipaddr values ('192.168.1.1'),('192.168.1.3'),('192.168.1.6'),('192.168.1.10'),('192.168.1.20'),('192.168.1.30');
Query OK, 6 rows affected (0.00 sec)
Records: 6 Duplicates: 0 Warnings: 0
| 192.168.1.1 |
| 192.168.1.3 |
| 192.168.1.6 |
| 192.168.1.10 |
| 192.168.1.20 |
6 rows in set (0.00 sec)
| 192.168.1.3 |
| 192.168.1.6 |
| 192.168.1.10 |
4 rows in set (0.00 sec)
password用户系统用户,md5用于应用
1 row in set (0.00 sec)
1 row in set (0.00 sec)