CREATE OR REPLACE PROCEDURE hello
as
--定义参数
--得到objectid
cursor Cursor_Objectid is
select id from (select a1.id from resource_wap_data_finish a1 union select b1.id from resource_client_data_finish b1);
--定义接收游标中的数据变量
v_objectid resource_wap_data_finish.id%type;
Begin
--删除表数据
--打开游标
open Cursor_Objectid;
--取游标中的数据
loop
-- v_countDelobjID := v_countDelobjID + 1;
--遍历游标中的下一行数据
fetch Cursor_Objectid
into v_objectid;
--检测是否已经达到最后一行
exit when Cursor_Objectid%notfound;
--删除数据信息
EXECUTE IMMEDIATE 'insert into t_iiss_c_resoperationlog@LINK_BFMDB(gid,rescode,opttype)values(SEQ_IISS_UNION.NEXTVAL@LINK_BFMDB,'||v_objectid||',5) ';
end loop;
close Cursor_Objectid;
--执行完游标
commit;
--提交异常 信息
exception
when others then
DBMS_OUTPUT.PUT_LINE('sssssssssssssssssssssssssssssssssss');
rollback ;
end hello;
分享到:
相关推荐
su - oracle -c "exp system/manager full=y inctype=complete file=/oracle/export/db_comp$rq.dmp" 累计备份的SH文件:exp_cumu.sh rq=` date +"%m%d" ` su - oracle -c "exp system/manager full=y inctype=...
sql> create user juncky identified by oracle default tablespace users sql> temporary tablespace temp quota 10m on data password expire sql> [account lock|unlock] [profile profilename|default]; ...
@d:D:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlxplan.sql—创建了索引查询表 explain plan for select ename,job,sal,comm from empcon where (sal-700);--已解释 desc plan_table; col id for 999 col ...
8、存储函数和过程 查看函数和过程的状态 SQL>select object_name,status from user_objects where object_type='FUNCTION'; SQL>select object_name,status from user_objects where object_type='PROCEDURE';...
Ensure that the directories specified in the parameters for USER_DUMP_DEST and BACKGROUND_DUMP_DEST are set up as utl_file_dir directives in the init.ora, eg utl_file_dir=myDB/oratrace/back utl_file_...
删除HKEY_CURRENT_USER/SOFTWARE/Microsoft/windows/CurrentVersion/Explorer/MenuOrder/Start Menu/Programs中所有以oracle 开头的键。 删除HKDY_LOCAL_MACHINE/SOFTWARE/ODBC/ODBCINST.INI中除Microsoft ...
Usage: ora [-u user] [-i instance#] <command> [] General -u user/pass use USER/PASS to log in -i instance# append # to ORACLE_SID -sid <sid> set ORACLE_SID to sid -top # limit some large queries ...
user_ini.filename = ".user.ini" ; To disable this feature set this option to empty value ;user_ini.filename = ; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds ...
如:select table_name from user_tables where table_name like 'S\_%' escape'\'; ' 找出“S_“开头的,由于下划线有任意字符的含义,故需另外定义转移符。 但习惯用“\”,为方便其他程序员阅读和检测,一般不...
WHERE coname LIKE ‘%Tech%’ AND indname = ‘Computing’; 注意AS关键字是任选的,然而我建议使用他从而更加清楚。而且,专栏可以使用格式alias = table_name.column_name来别名化,但表格不能这样来别名化。 自...
The filename can include %dbname%, %dbuser% and %date% variables to separate output files based on the database, user and date. Program Window Enhancements You can now suppress a hint or warning for...
The filename can include %dbname%, %dbuser% and %date% variables to separate output files based on the database, user and date. Program Window Enhancements You can now suppress a hint or warning for...
The filename can include %dbname%, %dbuser% and %date% variables to separate output files based on the database, user and date. Program Window Enhancements You can now suppress a hint or warning for ...
The filename can include %dbname%, %dbuser% and %date% variables to separate output files based on the database, user and date. Program Window Enhancements You can now suppress a hint or warning for ...
no DLLs Single-file database SQL‘92 (DDL & DML) support Single-user and multi-user mode (file-server) Unmatched ease-of-use 100% compatibility with standard DB-aware controls Strong encryption BLOB ...
查找:select * from table1 where field1 like ’%value1%’ ---like的语法很精妙,查资料! 排序:select * from table1 order by field1,field2 [desc] 总数:select count as totalcount from table1 求和:...
查找:select * from table1 where field1 like ’%value1%’ ---like的语法很精妙,查资料! 排序:select * from table1 order by field1,field2 [desc] 总数:select count as totalcount from table1 求和:...
查找:select * from table1 where field1 like ’%value1%’ ---like的语法很精妙,查资料! 排序:select * from table1 order by field1,field2 [desc] 总数:select count as totalcount from table1 求和:...
实现数据导入/导出的存储过程 根据不同的参数,可以实现导入/导出整个数据库/单个表 调用示例: --导出调用示例 ----导出单个表 exec file2table 'zj','','','xzkh_sa..地区资料','c:\zj.txt',1 ----导出整个数据库 ...
mssql 2000 Access DB2 oracle 【mysql安装】 1、官方下载mysql win32 msi 2、点击安装 3、配置 4、查看是否安装成功 通过cmd 输入netstat -a搜索3306端口是否处于listening状态 【mysql服务的启动与停止】 1...