转载自:www.cnblogs.com/sea-stream/p/11299667.html
| mysql> select * from table1; | |||
|---|---|---|---|
| name_new | transactor | pid | order_date |
| 1hahha | 1xiaohong | 1 | 2019-08-04 20:45:47 |
| 2hahha | 2xiaohong | 2 | 2019-08-04 20:45:57 |
| 3hahha | 3xiaohong | 3 | 2019-08-04 20:46:02 |
| 4hahha | 4xiaohong | 4 | 2019-08-04 20:46:05 |
| 3hahha | bob | 5 | 2019-08-04 20:46:08 |
| 3hahha | lee | 6 | 2019-08-04 20:46:12 |
6 rows in set (0.01 sec)
| mysql> select * from table1 where minute(order_date)=46; | |||
|---|---|---|---|
| name_new | transactor | pid | order_date |
| 3hahha | 3xiaohong | 3 | 2019-08-04 20:46:02 |
| 4hahha | 4xiaohong | 4 | 2019-08-04 20:46:05 |
| 3hahha | bob | 5 | 2019-08-04 20:46:08 |
| 3hahha | lee | 6 | 2019-08-04 20:46:12 |
4 rows in set (0.00 sec)
| mysql> select * from table1 where second(order_date) between 2 and 12; | |||
|---|---|---|---|
| name_new | transactor | pid | order_date |
| 3hahha | 3xiaohong | 3 | 2019-08-04 20:46:02 |
| 4hahha | 4xiaohong | 4 | 2019-08-04 20:46:05 |
| 3hahha | bob | 5 | 2019-08-04 20:46:08 |
| 3hahha | lee | 6 | 2019-08-04 20:46:12 |
4 rows in set (0.00 sec)
| mysql> select * from table1 where second(order_date) between 2 and 9; | |||
|---|---|---|---|
| name_new | transactor | pid | order_date |
| 3hahha | 3xiaohong | 3 | 2019-08-04 20:46:02 |
| 4hahha | 4xiaohong | 4 | 2019-08-04 20:46:05 |
| 3hahha | bob | 5 | 2019-08-04 20:46:08 |
3 rows in set (0.00 sec)
叼茂SEO.bfbikes.com
不错不错,我喜欢看 https://www.237fa.com/
看的我热血沸腾啊www.jiwenlaw.com
哈哈哈,写的太好了https://www.cscnn.com/
哈哈哈,写的太好了https://www.lawjida.com/