-- EXTRACT函数:返回具体的年、月、日、时、分、秒等具体时间。 SELECT EXTRACT (YEAR FROM --SYSDATE SYSTIMESTAMP ) YEAR FROM DUAL; SELECT EXTRACT (MONTH FROM --SYSDATE SYSTIMESTAMP ) YEAR FROM DUAL; SELECT EXTRACT (DAY FROM --SYSDATE SYSTIMESTAMP ) YEAR FROM DUAL; SELECT EXTRACT (HOUR FROM SYSTIMESTAMP) YEAR FROM DUAL; SELECT EXTRACT (MINUTE FROM SYSTIMESTAMP) YEAR FROM DUAL; SELECT EXTRACT (SECOND FROM SYSTIMESTAMP) YEAR FROM DUAL; SELECT EXTRACT (DAY FROM SYSTIMESTAMP) YEAR FROM DUAL; SELECT EXTRACT(YEAR FROM ORDERDATE) AS O --EG: SELECT EXTRACT(YEAR FROM SYSDATE) AS YEAR_, EXTRACT(MONTH FROM SYSDATE) AS MONTH_, EXTRACT(DAY FROM SYSDATE) AS DAY_ FROM DUAL