Identify the correct output produced by the following SQL command.
SELECT MONTH('2003/12/11');
Identify the correct output produced by the following SQL command.
SELECT MONTH('2003/12/11');
Solution
✅ Correct Option: 3
The MySQL function returns the month of a date as a number from 1 to 12. The date string is in the format YYYY/MM/DD, so '2003/12/11' means year 2003, month 12, day 11. The output is therefore 12.
Option 1: 11 is the day of the date, which would return, not the month.
Option 2: DECEMBER is the month name, which is returned by , not .
Related questions:
2025: 27 May Shift 2
2026: 23 May Shift 1
2026: 23 May Shift 2
2026: 23 May Shift 1