Link to home
Start Free TrialLog in
Avatar of RVL
RVL

asked on

copy from one table to another

Hi

i would like to copy everything from talbe a_dupe to b_dupe

thanks
ASKER CERTIFIED SOLUTION
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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.