Multiple choice technology databases

let sysdate='19-SEP-2009' select round(sysdate,'YEAR'),round(sysdate,'MONTH') from dual would results in?

  1. 09,SEP

  2. 1/1/2010,1/10/2009

  3. 1/1/2009,1/1/2009

  4. 2009,SEPTEMBER

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

ROUND(date, 'YEAR') rounds to January 1st of the nearest year. September is past mid-year, so it rounds up to 2010. ROUND(date, 'MONTH') rounds to the 1st of nearest month. Day 19 is past mid-month, so September rounds to October 1, 2009.