Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: assigning variables based on an insertion...
You can also do this
Declare
lUserId Users.Id%Type;
lGroupdID Groups.Id%Type;
Begin
Insert Into Users(Id,Name) Values(1,'mary') returning Id into
lUserId;
Insert Into Groups(Id,Name) Values(1,'accounting')returning Id into
lGroupId;
Insert Into Users_Groups(User_Id,Group_Id) Values(lUserId,lGroupId);
End;
/
Received on Tue Dec 21 2004 - 03:47:14 CST