开发者

attach a table to a database from another database

I'm working on MSSQL 2008. And i want to insert a table that is already in db1, t开发者_JAVA百科o another database db2. so i want to copy the table with attributes and content. Can i do this?

Thank you..


If you just want the bare minimum table definition, without any constraints or indexes:

use db2
go

select * into dbo.NewTable from db1.dbo.OriginalTable
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜