Oracle函数

-- 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

 

上一篇:BugkuCTF extract变量覆盖


下一篇:scrapy提取数据之:xpath选择器 xpath选择 属性值 text string 几种结果