SELECT INTO 语句创建一个新表,并用 SELECT 的结果集填充该表。新表的结构由选择列表中表达式的特性定义,例如:
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)
从表Shippers和LinkServer.DB.dbo.Shippers 中检索Shippers的全部项目和LinkServer.DB.dbo.Shippers的
Address,City,Region,PostalCode;并且Shippers.ShipperID =LinkServer.DB.dbo.Shippers.ShipperID 。
其中LinkServer是数据源,DB数据名。