the procedure:delete the data of one table

imlihj2007發表於2008-01-10
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部落格 ” ,連結:http://blog.itpub.net/9879835/viewspace-997038/,如需轉載,請註明出處,否則將追究法律責任。

相關文章