sysdate | current_date | current_time | current_timestamp | now() |
返回服务器的时间 | 返回当前会话时间 | |||
2021-09-01 14:20:40.0 | 2021-09-01 | 14:20:40 | 2021-09-01 14:20:40.050838 | 2021-09-01 14:20:40.049094 |
SELECT SYSDATE --服务器当前时间
SELECT SYSDATE-1 --服务器当前时间-1天
SELECT SYSDATE+'-2 month' --服务器当前时间-2个月
SELECT SYSDATE-1+'-2 month' --服务器当前时间减1天,再减2个月
now()操作同上