Which SQL function would you use to extract the month from a date column in Oracle SQL?
18 views
- MONTH(date_column)
- EXTRACT(MONTH FROM date_column) (Correct Answer)
- TO_CHAR(date_column, 'YYYY')
- DATEPART(MONTH, date_column)
Explanation
Oracle uses EXTRACT(field FROM date) to extract components like month, year, or day from date values. TO_CHAR formats dates, but does not directly return numeric month.