两个表,多条数据循环,游标+存储过程
来源:互联网 发布:易分销 源码 编辑:程序博客网 时间:2024/05/21 20:23
create procedure Test as
cursor c_rows is select distinct c_id from customer;
v_cid customer.cid%type;
v_ocid order.c_id%type;
v_count number;
v_cname customer.cname%type;
begin
open c_rows;
loop
fetch c_rows into v_cid;
exit when c_rows%notfound;
select count(o_id) into v_count from order where c_id=v_cid and date='2013-11-11';
if v_count>1 then
select c_id,c_name into v_oid,v_cname from customer where c_id=v_id;
dbms_output.putline(v_cid);
dbms_output.putline(v_cname);
end if;
end loop;
close c_rows;
end;
- 两个表,多条数据循环,游标+存储过程
- 在存储过程中使用游标循环表,组织数据
- sql 存储过程 游标执行循环数据
- sql存储过程 游标 循环表 guoyz_1
- sql存储过程【游标-循环表】
- 存储过程,游标,循环,临时表
- sql存储过程【游标-循环表】
- 利用存储过程把两个表的数据插入到一个新表中(存储过程中写两个游标)
- MySql 存储过程使用游标循环插入数据示例
- oracle 采用游标循环插入数据的存储过程
- MySql存储过程使用游标循环插入数据示例
- 存储过程 游标嵌套循环
- mysql 存储过程 游标 循环
- 一个蛮复杂的存储过程,游标,循环,临时表
- mysql 存储过程(临时表、循环、游标综合运用)
- oracle存储过程循环插入10000条数据
- mysql通过存储过程循环插入400条数据
- mysql存储过程循环修改每一条数据
- How to fix "FAILURE DURING CONVERSION TO COFF: FILE INVALID OR CORRUPT"
- windows核心编程(五)作业内核对象
- tiny6410内核下载(tftp)
- linux 内核调用函数添加 & 内核编译
- 程序员那点事
- 两个表,多条数据循环,游标+存储过程
- 电商大战引发的思考
- hdu oj 2011
- mybatis 学习2
- IOS之Delegate
- 查看linux是32位还是64位
- linux 命令整理
- extjs4 appendChild 添加节点后不显示问题的解决
- Db Attribute(Custom ORM ) Usage