开发者

SQL Server - Create Copy of Multiple Tables in Same Database

I need to duplicate several tables in a single database. Basically we have an old dot net nuke portal that needs to be split and our host limits us to a single database. So we just want to take the existing tables but copy them with an exact duplicate but different table prefix name (e.g. EEPTL_Users to JBPTL_Users).

I can use 'script to - create' to make the proper table structure but how do I do the proper inserts when I need to specify the primary keys but 开发者_JAVA技巧want the column to be an auto-incrementing identiy?

Is there a tool for doing what I need?


SET IDENTITY_INSERT [table name] ON

INSERTS

SET IDENTITY_INSERT [table name] OFf
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜