Insert into a table from another [message #20600] |
Thu, 06 June 2002 07:33 |
Debby
Messages: 3 Registered: June 2002
|
Junior Member |
|
|
I have two tables like this:
Table T1
--------
A1 VARCHAR2 (2)
B1 VARCHAR2 (2)
Table T2
--------
A2 VARCHAR2 (2)
B2 VARCHAR2 (2)
C2 DATE
I want to insert all the rows from table T1 into
Table T2 into fields A2, B2. This can be done
using:
INSERT INTO T2(A2, B2) (SELECT * FROM T1);
But my problem is, now I also want the C2 field
to be populated with SYSDATE.
Can it be done with a nice and easy SQL? A PL/SQL
construct may also be OK. But I am more comfortable
with a single SQL query.
I also do not want a Trigger.
TIA,
Deborah
|
|
|
|
|