开发者

Copy Rename Table in SQL Express

I want to copy and rename a table in SQL EXPRESS in an mdf data开发者_如何学运维base. Which is the best way to do this?


Try a

select * into [newtablename] from [oldtablename] 

which will make a copy of your old table with a new name.


You can rename a table using sp_rename. Note the warning (which will also appear when you run the stored proc):

Changing any part of an object name can break scripts and stored procedures.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜