hy....
how to get year now and 10 year before with query
result is 2009,2008,2007,2006,......

thanx..

you simply need to use TO_CHAR for the purpose and convert the sysdate to desired format.

is there any other option to get the solution?

select to_char( add_months(sysdate, (-12*level)) , 'yyyy') years 
from dual
connect by level <= 10
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.