Re: trouble with insert

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Sun, 13 Jul 2008 16:08:49 +0200
Message-ID: <g5d29j$r3v$01$1@news.t-online.com>


sheldonlg schrieb:
>
> Duh! I found the answer. I cannot specify "VALUES". I should have
> written:
>
> insert into table2 (fld1, fld2, fld3)
> (select fld1, fld2, fld3 from table1 where blah)
>

I am glad, you solved your problem, but maybe you will be interested to notice, that similar semantics ( with values clause ) is possible for multitable insert ( that can operate on one table as well) - something like

create table emp_short
as
select ename,empno
from emp where 1=2
;

insert all
into emp_short(ename,empno)
values(ename,empno)
select * from emp
;

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#i2095116

Best regards

Maxim Received on Sun Jul 13 2008 - 09:08:49 CDT

Original text of this message