本文介紹了使用 Microsoft SQL Server 管理復(fù)制 TABLE的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
需要使用 Microsoft SQL Management Studio 2008
TABLE 也需要復(fù)制所有表格行(主鍵)ID.
The TABLE needs to duplicate all table row (Primary Key) ID as well.
推薦答案
在 SSMS 中打開一個新的查詢窗口,然后執(zhí)行類似的操作
In SSMS open a new query window and then do something like
SELECT * INTO NewTable
FROM OldTable
把NewTable改成新表應(yīng)該有的名字,把OldTable改成當(dāng)前表的名字
change NewTable to the name that the new table should have, change OldTable to the name of the current table
這將復(fù)制基本表結(jié)構(gòu)和所有數(shù)據(jù)...它不會做任何約束,您需要將它們編寫出來并更改這些腳本中的名稱
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
這篇關(guān)于使用 Microsoft SQL Server 管理復(fù)制 TABLE的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!