18 lines
421 B
MySQL
18 lines
421 B
MySQL
|
-- 1
|
||
|
SELECT EXTRACT(DAY FROM SYSDATE), EXTRACT(MONTH FROM SYSDATE), EXTRACT(YEAR FROM SYSDATE) FROM DUAL;
|
||
|
|
||
|
-- 2
|
||
|
SELECT ADD_MONTHS(SYSDATE, 6) FROM DUAL;
|
||
|
|
||
|
-- 3
|
||
|
SELECT MONTHS_BETWEEN(SYSDATE, NACIMIENTO) FROM FUTBOLISTAS;
|
||
|
|
||
|
-- 4
|
||
|
SELECT LAST_DAY(SYSDATE) FROM DUAL;
|
||
|
|
||
|
-- 5
|
||
|
SELECT NEXT_DAY(SYSDATE, "LUNES") FROM DUAL;
|
||
|
|
||
|
-- 6
|
||
|
SELECT TO_CHAR(SYSDATE - 4, "DAY") "Four Days Ago", TO_CHAR(SYSDATE + 1, "DAY") "Tomorrow" FROM DUAL;
|