ITeye博客

oracle存储过程

memorymyann · 2011-02-15 16:48 · 数据库 · 数据库 · Markdown

一个简单的存储过程样例,为免忘记,写在这里:

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;
/

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。