Multiple choice

Which script displays '01-MAR-03' when the JOIN_DATE value is '03-MAR-03'?

  1. SELECT ROUND(join_date, 'YEAR') FROMEmp

  2. SELECT ROUND(join_date, 'DAY') FROMEmp

  3. SELECT ROUND(join_date, 'MONTH') FROMEmp

  4. SELECT ROUND(TO_CHAR(join_date, 'YYYY')) FROMEmp

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The ROUND function in SQL with the date format model 'MONTH' rounds the date to the first day of the current month. If the date is '03-MAR-03', rounding to the month yields '01-MAR-03'. Rounding to 'YEAR' would yield '01-JAN-03'.