Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> how to do multiple variable selects in a trigger
I'm trying to write a trigger on t1 that in effect does this
inside:
..
DECLARE
i NUMBER; j NUMBER; k NUMBER;
SELECT id1 into i, id2 into j, id3 into k FROM t2
WHERE t2.id = :new.id;
...
I get compilation errors and they seem to be around this attempt to select multiple columns into multiple variables.
Is there a way to do this (without the redundant multiple selects, as I can do SELECT id1 into i FROM t2 just fine, but don't want to do it three time!)
Thanks,
-- Asya Kamsky In our society, you can state your views, but they have to be correct. --- Ernie Hai, coordinator Singapore Gov't Internet ProjectReceived on Fri Mar 12 2004 - 15:31:16 CST
![]() |
![]() |