????Oracle?α???Щ??????????????????
???????????? ???????[ 2014/6/25 15:54:11 ] ??????????????? ????? Oracle
???? ??????п?????洢???????????????д????????Щ???????????????????????? ?ó?????????£?????ù??????????????????????????????????????????OK
???????????2?????
??????temp1??????id1??val1??2????Σ?
??????temp2??????id2??val2 2????Ρ?
????????????????????????2?????ID???й?????????temp2?а?????temp1??id?????????temp1?а?val1???????1???????????????0.
?????????????????????洢?????
create or replace procedure mysdtest
as
cursor te_v1 is
select id1??val1 from Temp1;
cursor te_v2 is
select id2??val2 from Temp2;
v1_t te_v1%rowtype;
v2_t te_v2%rowtype;
begin
open te_v1;
loop
fetch te_v1 into v1_t;
exit when te_v1%notfound;
open te_v2;
loop
fetch te_v2 into v2_t;
exit when te_v2%notfound;
if v1_t.id1=v2_t.id2
then update temp1 set val1='1' where id1=v1_t.id1;
else
update temp1 set val1='0' where id1=v1_t.id1;
end if;
end loop;
close te_v2;
end loop;
close te_v1;
end;
|
????????д??????????????2?????????????????0?????????3??????????
??????????????? t1 ???temp1?????????????val1?1????????????????t2??????t1?????????????else ???t1??val1??????0???????????????????????else??????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11