oracle认证辅导:oracle多层游标嵌套Oracle认证考试
文章作者 100test 发表时间 2009:11:28 16:04:28
来源 100Test.Com百考试题网
"mkhgigh">
一般的多层嵌套可以用几个表联合起来查询就能替代,但有时却不能代替,比如,第二个要查询的值是第一个查出值后再进行like运算
--------------------
declare
v_0 number.
v_1 number.
cursor c1 is 0select productordernumber from his_productorder@pro_crm where productid in (9000045516).
cursor c2 is 0select cust_order_id from suf_cust_order_q_his where cust_order_num like v_0|| % .
cursor c3 is 0select * from suf_work_order_q_his where cust_order_id=v_1.
begin
for i in c1 loop
v_0:=i.productordernumber.
for j in c2 loop
v_1:=j.cust_order_id.
for k in c3 loop
dbms_output.put_line(k.work_order_id|| ||k.status).
end loop.
end loop.
end loop.
编辑特别推荐:
oracle认证考试费用
查看修改ORACLE10G归档日志空间的限制