select to_char(sysdate,'yyyy') from dual
union
select to_char(sysdate-365,'yyyy') from dual
union
select to_char(sysdate-365*2,'yyyy') from dual
union
select to_char(sysdate-365*3,'yyyy') from dual
union
select to_char(sysdate-365*4,'yyyy') from dual
union
select to_char(sysdate-365*5,'yyyy') from dual
union
select to_char(sysdate+365,'yyyy') from dual
union
select to_char(sysdate+365*2,'yyyy') from dual
union
select to_char(sysdate+365*3,'yyyy') from dual
union
select to_char(sysdate+365*4,'yyyy') from dual
union
select to_char(sysdate+365*5,'yyyy') from dual
网上看的
select extract(year from sysdate) from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) -1 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) -2 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) -3 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) -4 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) -5 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) +1 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) +2 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) +3 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) +4 from BO_ACT_MES_SECMAINTENANCE
union
select extract(year from sysdate) +5 from BO_ACT_MES_SECMAINTENANCE