Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Insert into 2 tables at one time
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-lReceived on Fri Mar 18 2005 - 05:33:05 CST