Solved

Column Order While Inserting a Subset Of Columns Of Table to Another Table

Posted on 2014-11-20
1
266 Views
Last Modified: 2014-11-20
Dear Experts,

I have table TA with columns a, b, c, d, e, f.  I have table TB with columns x, y, z, t. I'll insert columns a, d, e, f into table TB using Insert statement with Select. Is below statement correct without using AS keyword for column mappings?

BR

insert into TB (x,y,z,t) select a,d,e,f from TA;  

Note: AS keyword will not be used.
0
Comment
Question by:GurcanK
1 Comment
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 40455156
Looks good to me.  The AS after a column just sets the column alias.  Has nothing to do with an insert with select.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question