Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: a pl/sql question?
Yes there are the same but you can add an exception bloc
in each begin/end bloc, in the second case, you can handle
separatly the errors from the fetch and from insert.
--
Have a nice day
Michel
<yliu_at_creighton.edu> a écrit dans le message :
Pine.HPP.3.95.1000308142938.17769A-100000_at_penguin.creighton.edu...
> Hi All,
>
> I was wondering if someone can tell me what the difference is between the
> following two pl/sql logics? To me, they are the same.
>
> (1).
> open c1;
> loop
> begin
> fetch c1 into .... --- some variables
> exit when c1%notfound;
> insert into temp .... (the values of those variables)
> end;
> end loop;
> close c1;
>
> (2).
> open c1;
> loop
> begin
> fetch c1 into .... --- some variables;
> exit when c1%notfound;
> end;
> begin
> insert into temp .... (the values of those variables)
> end;
> end loop;
> close c1;
>
> Thank you very much for your help.
>
> Best Regards,
>
> Yongge
> yliu_at_creighton.edu
>
>
>
Received on Thu Mar 09 2000 - 01:58:13 CST