select into语句的应用技巧
1. 将一个数据表的结构复制到一个新表上,但是不移动记录:
select * into newtable from dbo.Inventory where 1<>1
2.select into语句创建一个新表,并用 select的结果集填充该表
例1
select Shippers.*, Link.Address, Link.City,Link.Region, Link.PostalCode
into NewShippers
from Shippers join LinkServer.DB.dbo.Shippers AS Link
on (Shippers.ShipperID = Link.ShipperID)
例2
select * into Inventory1 from Inventory where locationid=25