本文介紹了使用 Microsoft SQL Server 管理復制 TABLE的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
需要使用 Microsoft SQL Management Studio 2008
TABLE 也需要復制所有表格行(主鍵)ID.
The TABLE needs to duplicate all table row (Primary Key) ID as well.
推薦答案
在 SSMS 中打開一個新的查詢窗口,然后執行類似的操作
In SSMS open a new query window and then do something like
SELECT * INTO NewTable
FROM OldTable
把NewTable改成新表應該有的名字,把OldTable改成當前表的名字
change NewTable to the name that the new table should have, change OldTable to the name of the current table
這將復制基本表結構和所有數據...它不會做任何約束,您需要將它們編寫出來并更改這些腳本中的名稱
this will copy over the basic table structure and all the data...it will NOT do any of the constraints, you need to script those out and change the names in those scripts
這篇關于使用 Microsoft SQL Server 管理復制 TABLE的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!