Skip to main contentSkip to solution

What will be the output of the following query?

SELECT NOW( ) ;

Solution

✅ Correct Option: 1

NOW() is a MySQL date and time function that returns the current system date and time together, in the format YYYY-MM-DD HH:MM:SS.


Option 2: this is CURDATE() (or CURRENT_DATE()), which gives only the date.

Option 3: this is CURTIME() (or CURRENT_TIME()), which gives only the time.

Option 4: this is YEAR(date), for example SELECT YEAR(NOW());.

Keyboard Shortcuts

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