I want to create a new table in SQL Server with the following query. I am unable to understand why this query doesn't work.
Query1: Works
SELECT * FROM TABLE1
UNION
SELECT * FROM TABLE2
Query2: Does not Work.
Error: Msg 170, Level 15, State 1, Line 7
Line 7: Incorrect syntax near ')'.
SELECT * INTO [NEW_TABLE]
FROM
(
SELECT * FROM TABLE1
UNION
SELECT * FROM TABLE2
)
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…