ceu-notes/1/GBD/notes/tema4-ej15.sql

18 lines
421 B
MySQL
Raw Normal View History

2022-02-02 16:27:29 +00:00
-- 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;