Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert into, Select *

WhatwasthatSep 2 2013 — edited Sep 3 2013

Hi,

Just wanted to check something, One of my colleagues is getting an error trying to insert data obtained from another database using this statement:

INSERT INTO SALES

select *

from SALES@remote_db

but they get an error due to different data types. This works though.

INSERT INTO SALES

(columnA, columnB, columnC,...)

select columnA, columnB, columnC,...

from SALES@remote_db

So the top statement uses the column order rather than the column name to insert?

I've never had a problem myself but I probably create the columns for the target table in the same orderĀ  as the source and I wanted to doublecheck what the top statement does.


This post has been answered by sb92075 on Sep 2 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2013
Added on Sep 2 2013
2 comments
2,861 views