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: stephen booth <stephenbooth.uk_at_gmail.com>
Date: Fri, 18 Mar 2005 10:29:37 +0000
Message-ID: <687bf9c405031802294d1ce414@mail.gmail.com>


On Fri, 18 Mar 2005 02:16:51 -0800 (PST), Kean Jacinta <jacintakean_at_yahoo.com> wrote:
> Hello
>
> Need some help on this. I have 2 table

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

Yes. When you insert into emp you query the view for the next value to get the new value and then for the insert into dept you use the current value.

Stephen

-- 
It's better to ask a silly question than to make a silly assumption.
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Mar 18 2005 - 05:33:05 CST

Original text of this message

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