Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> match columns on insert sub select
Anyone know of an easy way to copy data from table to table that will match
up exact same named columns from the source to the target?
TABLE1 (source)
FIELDA
FIELDB
FIELDC
FIELDD
TABLE2 (target)
FIELDB
FIELDA
FIELDD
FIELDC
FIELDE
FIELDF
FIELDG
A script would work but ideally it would be a keyword so you could do
something like this?
INSERT INTO TABLE2
(SELECT MATCHING * FROM TABLE1)
instead of having to write out
INSERT INTO TABLE2
(SELECT
FIELDB FIELDA FIELDD FIELDC '', '', '' FROM TABLE1) Thanks for any responses, -DanReceived on Thu Jul 31 2003 - 12:21:11 CDT
![]() |
![]() |