oracle存储过程
一个简单的存储过程样例,为免忘记,写在这里:
create or replace procedure clean_userunsubscription(day_p in number) as
day_v number(2);
last_v date;
begin
day_v := day_p;
last_v := sysdate - day_p;
delete from tbl_ss_user_unsubscription where endtime < last_v;
commit;
exception
when others then
rollback;
end;
/