Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-11-20
1
Medium Priority
?
273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to recover a database from a user managed backup

660 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