What is the difference between 'YYYY' and 'RRRR' in Oracle SQL

Viewed 89136

I have 2 queries in SQL:

select trunc(to_date('27-Jul-1987'),'YYYY') FROM dual; 

and

select trunc(to_date('27-Jul-1987'),'RRRR') FROM dual; 

Both are giving me the same result. What is the difference between 'RRRR' and 'YYYY'?

3 Answers
Related