在SQL Server中,这会将来自Customers表的100条记录插入到tmpFerdeen中:
SELECT top(100)* INTO tmpFerdeen FROM Customers
是否可以跨UNION ALL SELECT进行SELECT INTO:-
SELECT top(100)* FROM Customers UNION All SELECT top(100)* FROM CustomerEurope UNION All SELECT top(100)* FROM CustomerAsia UNION All SELECT top(100)* FROM CustomerAmericas
不太确定在哪里添加INTO子句。
这在SQL Server中有效:
SELECT * INTO tmpFerdeen FROM ( SELECT top 100 * FROM Customers UNION All SELECT top 100 * FROM CustomerEurope UNION All SELECT top 100 * FROM CustomerAsia UNION All SELECT top 100 * FROM CustomerAmericas ) as tmp