ITPub博客

首页 > 应用开发 > IT综合 > the procedure:delete the data of one table

the procedure:delete the data of one table

原创 IT综合 作者:imlihj2007 时间:2008-01-10 17:22:57 0 删除 编辑
create or replace procedure truncatetable_test(tab_name varchar2) is
The_c1 Integer;
The_result Integer;--dml_sql_result
M_jls number;
The_xh varchar2(2);
begin
The_C1 :=Dbms_sql.open_cursor;
Dbms_sql.parse(the_C1,'truncate table '||tab_name,dbms_sql.v7);
The_result:=Dbms_sql.execute(The_c1);
Dbms_sql.close_cursor(The_C1);
dbms_output.put_line('d'||The_C1||'*');

exception
when others then
dbms_output.put_line('d'||The_C1||'*');
dbms_output.put_line(sqlerrm);
dbms_output.put_line('d'||The_C1||'*');
end truncatetable_test;[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9879835/viewspace-997038/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: check the sfzh
请登录后发表评论 登录
全部评论

注册时间:2011-05-25

  • 博文量
    109
  • 访问量
    1577026