oracle简单匿名块的例子(循环隐式游标,动态执行sql)
- 2017-03-30 09:52:00
- 1147533288 原创
- 2332
简单匿名块的例子(循环隐式游标,动态执行sql),用于简单逻辑处理,入库更新等。
declare
cnt integer;begin
for cur in (select * from node_config@qcs where node_type='1') loop
select count(*) into cnt from (select distinct idcard from jmjbxxsjb a where communityid=cur.systemid and a.update_date>='201701');
execute immediate 'insert into t1_1 values(:1,:2)' using cur.systemid,cnt;
commit;
end loop;
end;
/
文章分类
联系我
| 联系人: | meepo |
|---|---|
| 电话: | ***** |
| Email: | 1147533288@qq.com |
| QQ: | 1147533288 |