1.複製結構也複製資料
select * into NEWTABLE from OLDTABLE
2.只複製結構,不複製資料
select * into NEWTABLE from OLDTABLE where 1=0
3.將A table某欄位資料複製到B table某欄位
update B
set B's column= (select a's column from A
where A's column=B's column)
4.指定匯入某欄位的資料至新的資料表
SELECT a,b,c into NEWTABLE from OLDTABLE
5.匯入資料至「已存在」的資料表
Insert into NEWTABLE select * from OLDTABLE
參考資料:
http://goodmanroc.blogspot.tw/2011/07/t-sql.html
http://blogs.technet.com/b/technet_taiwan/archive/2012/05/28/t-sql-how-to-quickly-create-a-copy-of-a-table-using-transact-sql.aspx