Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: assigning variables based on an insertion...

Re: assigning variables based on an insertion...

From: Prasad Raju <prasad.gadiraju_at_gmail.com>
Date: 21 Dec 2004 01:47:14 -0800
Message-ID: <1103622434.116839.170070@f14g2000cwb.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US