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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Insert into 2 tables at one time

RE: Insert into 2 tables at one time

From: Lex de Haan <lex.de.haan_at_naturaljoin.nl>
Date: Fri, 18 Mar 2005 11:26:37 +0100
Message-Id: <20050318102640.2A52AB000484@smtp-out2.tiscali.nl>

 

check out the Oracle SQL reference (and/or read my book :-) once you have selected NEXTVAL from an Oracle sequence, you can use CURRVAL in that same session to refer to the same sequence value ... kind regards,

Lex.  



Visit my website at http://www.naturaljoin.nl

-----Original Message-----

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Kean Jacinta
Sent: Friday, March 18, 2005 11:17
To: oracle-l_at_freelists.org
Subject: Insert into 2 tables at one time

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
--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Fri Mar 18 2005 - 05:30:10 CST

Original text of this message

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