The following are the differences in built-in datetime functions in Oracle (noted only where different):
- CURRENT_DATE —Use without ()
- SELECT CURRENT_DATE;
- CURRENT_TIME —Use without()
- SELECT CURRENT_TIME;
- LAST_DAY—Different formatting with literal
- LAST_DAY(DATE '2019-06-10')
- EXTRACT—Use in place of YEAR, MONTH, DAY, MINUTE, SECOND
- EXTRACT( MONTH FROM TO_DATE('10-Jun-2019 12:12:12', 'DD-Mon-YYYY HH24:MI:SS')) returns 6 for the month number. To learn more about the Oracle EXTRACT function, see the Further reading section in this chapter.
The rest of the MySQL datetime functions are not included in Oracle.
The following are the differences in built-in datetime functions in PostgreSQL (noted only where different):