67,541
社区成员
发帖
与我相关
我的任务
分享 select em.order_id into order_no from t_sale_order_ty_temp em where em.pay_flag='3' and em.datasource='JSYD' ;[/quote]
多条的话就是用游标和for循环啊,把你满足条件的数据写成一个cursor,然后遍历这个cursor做你的操作就行了,大概这样:
Cursor cursor1 is select,,,..,,,,,;
for everyrow1 in cursor1 loop
// 循环体 做你的更新就可以了
end loop;
select em.order_id into order_no from t_sale_order_ty_temp em where em.pay_flag='3' and em.datasource='JSYD' ;create or replace procedure Pro_test is
v_orderno varchar2(100);
begin
v_orderno := 'bree06';
--TODO
end Pro_test; select em.order_id into order_no from t_sale_order_ty_temp em where em.pay_flag='3' and em.datasource='JSYD' ;[/quote]
多条的话就是用游标和for循环啊,把你满足条件的数据写成一个cursor,然后遍历这个cursor做你的操作就行了,大概这样:
Cursor cursor1 is select,,,..,,,,,;
for everyrow1 in cursor1 loop
// 循环体 做你的更新就可以了
end loop;
[/quote]
我用的for循环,查询用as关键字,下面多次更新就能用啦,谢谢。