Re: trouble with insert

From: <sheldonlg>
Date: Sun, 13 Jul 2008 11:14:20 -0400
Message-ID: <lMSdna6xdsJDhufVnZ2dnUVZ_qfinZ2d@giganews.com>


Maxim Demenko wrote:
> 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

Thank you. That is very interesting. Received on Sun Jul 13 2008 - 10:14:20 CDT

Original text of this message