select sysdate,systimestamp,current_date,current_timestamp from dual;
這條語句返回 系統當前時間的三個版本,也有人這麼說 叫做返回系統當前session所在時區的默認時間。
sysdate返回的是系統的時間。
systimestamp也是當前系統的時間戳。
CURRENT_TIMESTAMP 與時區設置有關,返回的秒是系統的,返回的日期和時間是根據時區轉換過的。
current_date是對CURRENT_TIMESTAMP準確到秒的四捨五入。
These are features in Oracl9i or later version.
CURRENT_TIMESTAMP and CURRENT_DATE give session timestamp/date.
SYSTIMESTAMP and SYSDATE give databse date.
The two obviously may be in different timezones.