the procedure:delete the data of one table
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@]
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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DELETE_TABLE_STATS Proceduredelete
- How to monitor data transaction on one table
- Delete the temp tabledelete
- ssis multiple table to one file
- drop apply INSTANTIATION for one tableAPP
- How To Know If An Object (Table / Procedure / View /…) Is Currently BeingObjectView
- delete table 和 truncate table - 型別安全的心 - 部落格園delete型別
- Oracle10g Wait Event Data Collection ProcedureOracleAI
- You cannot change a partition into an extended one or vice versa Delete it firstdelete
- Convert Array of Objects to Data TableObject
- Truncate table 詳解及與delete,drop 的區別delete
- Truncate table詳解及與delete,drop的區別delete
- [UE] Data Table 對比工具 —— 用於 Data Table 對比以前的資料,檢視有什麼修改
- use azure data studio to create external table for oracleOracle
- DELETE TABLE資料後,查詢變慢,問題處理delete
- SQL Server 表分割槽(partitioned table/Data Partitioning)SQLServer
- Data Warehouse Guide閱讀筆記(七):partition tableGUIIDE筆記
- Procedure加密加密
- 00017: Data frame has at least one annotation group that is enabled and contains graphicsASTAI
- Oracle Wrap ProcedureOracle
- alter package/procedurePackage
- ORA-14060: data type or length of a table partitioning column may not be changed
- tomcat one connection one thread one request one threadTomcatthread
- delete input 與 delete all inputdelete
- delete OBSOLETE 與 delete expirieddelete
- MySQL中使用procedureMySql
- 怎樣加密procedure加密
- sql primary key procedureSQL
- deletedelete
- delete 和 delete [] 的真正區別delete
- oracle expert one on one (chm ebook)Oracle
- Procedure to create Distribution model
- Image Noise Reduction Develop Proceduredev
- Procedure for Setting Partner FunctionsFunction
- How to rename an Oracle stored procedureOracle
- EXECUTE IMMEDIATE dynamic sql in procedureSQL
- 分頁procedure (SQL Server)SQLServer
- oracle 中呼叫 store procedureOracle