sql
复制代码
select sleep(2) as datetime
union all
select sysdate() -- sysdate() 返回的时间是当前的系统时间,而 now() 返回的是当前的会话时间。
union all
select now() -- 等价于 localtime,localtime(),localtimestamp,localtimestamp(),current_timestamp,current_timestamp()
union all
select concat(curdate(),' ',curtime())
union all
select concat(date(now()),' ',time(now()))
union all
select concat(year(now()),'-',month(now()),'-',day(now()),' ',hour(now()),':',minute(now()),':',second(now()))
union all
select dayname(now())
union all
select monthname(now());