我希望使用oracle 11g中的存储过程输出以下查询

时间:2014-11-26 10:34:25

标签: oracle select procedure

select username,expiry_date,sysdate,FLOOR(expiry_date-sysdate) as "days left"
from dba_users
where username in ( 'ABCD',   'TSTL',    'HDO',    'LOTER',
  'SMB',    'UStR',    'N3P',    'FADT',    'FRE',    'VMSV',    'CHATY',
  'PBKMIN',    'LMSROD',    'UKPSPREPROD')
order by expiry_date;

1 个答案:

答案 0 :(得分:-1)

create or replace procedure XXX(p_rs out sys_refcursor)
as
begin

  open p_rs for
    select ......

end;