Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PRO*C question
Hi all !
I am trying to optimize a PRO*C program on HP/UX and I am just wondering how FOR-LOOPs are expanded.
For example, if I write:
EXEC SQL FOR :MyCounter
DELETE FROM MyTable
WHERE MyPK = :MyArrayOfPKs;
Does it expand to something like this (which is better):
DELETE FROM MyTable
WHERE MyPK IN (MyArrayOfPKs(1), ..., MyArrayOfPKs(MyCounter));
or to something like that:
FOR i IN 1..MyCounter LOOP
DELETE FROM MyTable
WHERE MyPK = MyArrayOfPKs (i);
END LOOP;
?
Any help would be very appreciated. Many thanks.
Of course I also use UPDATE statements but I think the answer will be the same.
Denis. Received on Mon Jun 15 1998 - 12:38:38 CDT
![]() |
![]() |