Solved

copy table

Posted on 2010-09-02
3
590 Views
Last Modified: 2012-05-10
hi, I would like to copy everything from one table to another
eg i_pn into p_pn then m_pn into p_pn
0
Comment
Question by:RVL
[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
  • 2
3 Comments
 
LVL 14

Expert Comment

by:Christopher Gordon
ID: 33590781
Do the table schemas match each other in the tables you're trying to do the copy?
0
 
LVL 14

Accepted Solution

by:
Christopher Gordon earned 500 total points
ID: 33590815
if schemas match:

insert into p_pn
select * from  i_pn

you'll get an error if they don't match.

if the table doesn't even exist, I usually use the SQL Import Export wizard.
0
 
LVL 22

Expert Comment

by:pivar
ID: 33590850
Hi,

If the table doesn't exist and you want a copy, you can use

select * into p_pn from i_pn

/peter
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

630 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