In an interview today, I was asked if I could write a single query to copy data from 3 source tables to an empty destination table.
I started saying "I will use a temp table or table variables", however the interviewer said "no, I want to see a single statement or query."
I was blank :(
Can someone share the right answer?
INSERT INTO EmptyTable (SELECT ... UNION SELECT ...) ;– ypercube Jul 19 '12 at 12:01