• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 420
  • Last Modified:

copy from one table to another

Hi

i would like to copy everything from talbe a_dupe to b_dupe

thanks
0
RVL
Asked:
RVL
1 Solution
 
Ephraim WangoyaCommented:

insert into b_dupe
select * from a_dupe
0
 
tigin44Commented:
if you have an identity column on b_dupe table you should also set the identity insert as...

SET IDENTITY_INSERT b_dupe ON

INSERT INTO b_dupe
SELECT *
FROM a_dupe
0
 
Anthony PerkinsCommented:
Actually if you have an IDENTITY column you need to explicitly name all your columns.  Also, don't forget to turn off INDENTITY_INSERT once done.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now