mysql 中的时间 current_time,now(),sysdate()

来源:互联网 发布:蓝牙车载充电器 知乎 编辑:程序博客网 时间:2024/06/16 05:39
mysql> select current_time,now(),sysdate(),sleep(3),current_time,now(),sysdate();
+--------------+---------------------+---------------------+----------+--------------+---------------------+---------------------+
| current_time | now()               | sysdate()           | sleep(3) | current_time | now()               | sysdate()           |
+--------------+---------------------+---------------------+----------+--------------+---------------------+---------------------+
| 11:11:09     | 2017-04-17 11:11:09 | 2017-04-17 11:11:09 |        0 | 11:11:09     | 2017-04-17 11:11:09 | 2017-04-17 11:11:12 |
+--------------+---------------------+---------------------+----------+--------------+---------------------+---------------------+

1 row in set (3.00 sec)


current_time:与now()含义一致

now():当前sql语句执行时候的时间

sysdate():当前函数执行的时间。

0 0
原创粉丝点击