oracle function

SUBSTR(REPLACE('HELLO WORLD','OR','I'),INSTR('HELLO WORLD','W')) || ' WEST' 

WILD WEST
Which of the following expressions returns 50?


SELECT TRUNC(50.995), ROUND(49.501), FLOOR(50.99), CEIL(49.01) FROM DUAL;

    MONTHS_BETWEEN (date1, date2)
    用于计算date1和date2之间有几个月。

    如果date1在日历中比date2晚,那么MONTHS_BETWEEN()就返回一个正数。
    如果date1在日历中比date2早,那么MONTHS_BETWEEN()就返回一个负数。
    如果date1和date2日期一样,那么MONTHS_BETWEEN()就返回一个0。
 

SELECT MONTHS_BETWEEN (ADD_MONTHS(SYSDATE,1.5),SYSDATE)  FROM DUAL;

1
The format model for minutes is 'MI'. 'MM' represents months. And since the model for the hour didn't include the '24' modifier, the time is shown in 12-hour format.

TO_CHAR(TO_DATE('25SEP2018 18:01:05'),'HH:MM:SS') 

06:09:05

 

posted @ 2019-06-13 16:28  kakaisgood  阅读(471)  评论(0编辑  收藏  举报