Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: insert into ... select *
Rainer Nonk wrote:
>
> Hi,
>
> I would like to extend the following statement:
> insert into table_arch select * from table_runtime where order_number =
> 'abc';
>
> table_arch got a new field (a date field, with a creation timestamp). So
> it has one field more than table_runtime. The problem is: i don't have
> any idea how to fill this additional field within one statement. Could
> you give me a hint how the new statement should look like ?
>
> (And: i know how to get the current date: select sysdate from dual ;-)
>
> thank you,
> Rainer
Rainer,
You need to specify the columns in the syntax and simply add SYSDATE to
the select part.
i.e.
insert into table_arch select col1, col2,....,sysdate from
table_runtime;
regards
Anthony Hogan
Received on Tue Apr 29 2003 - 02:30:37 CDT