Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending several tables at the same time

Status
Not open for further replies.

belinda7

Technical User
Oct 22, 2004
14
CA
What is the best way to append ten tables with identical fields into one table? All records must be kept even if there are duplicates.
 
Something like this ?
INSERT INTO theTable (field list) SELECT * FROM (
SELECT field list FROM Table1
UNION ALL
SELECT field list FROM Table2
UNION ALL
...
SELECT field list FROM Table10
) A;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top