Skip to main contentSkip to solution

What output the following SQL query will generate?

SELECT DATE(NOW());

Solution

✅ Correct Option: 3

NOW() returns the current system date and time. DATE() extracts only the date part from a date/time expression. So DATE(NOW())\text{DATE(NOW())} returns just the current date, in the format YYYY-MM-DD.


Option 1: the day part (1 to 31) is returned by DAY() or DAYOFMONTH(), not DATE().

Option 2: the name of the day (such as Monday) is returned by DAYNAME().

Option 4: this is what NOW() alone returns; wrapping it in DATE() drops the time.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question