Re: Insert into 2 tables at one time

  • From: Martic Zoran <zoran_martic@xxxxxxxxx>
  • To: jacintakean@xxxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 18 Mar 2005 03:03:44 -0800 (PST)

Just simple example:

insert into emp values (seq1.nextval, ....) returning
empid into :somebind;
insert into dept values (..,:somebind, ...);

Regards,
Zoran


--- Kean Jacinta <jacintakean@xxxxxxxxx> wrote:
> Hello 
> 
> Need some help on this. I have 2 table
> 
> 
> Emp
> ----------
> empid   (running on oracle sequenceno)
> empname
> deptid
> 
> Dept
> ----------
> deptid
> empid
> deptname
> 
> I need to insert into emp table first and then get
> seqid just created and insert into dept table. Would
> it be possible to do tat ?
> 
> 
> 
> 
> 
> 
> 
>               
> __________________________________ 
> Do you Yahoo!? 
> Make Yahoo! your home page 
> http://www.yahoo.com/r/hs
> --
> //www.freelists.org/webpage/oracle-l
> 


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
--
//www.freelists.org/webpage/oracle-l

Other related posts: