mysql中有几个函数都可以获取系统时间,用的比较多如下面几个:
这3个函数的作用相同,都是返回当前时间,格式:yyyy-mm-dd hh:mm:ss
select now();
select current_timestamp();
select current_timestamp;
获取Unix时间戳
select unix_timestamp(now());
更多关于mysql中时间的一些操作,可参考:https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html