Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One way of naming the newly formed table after using SQL UNION ALL to combine multiple tables into one is by using an alias in the query. For example:

SELECT column1, column2
FROM table1
UNION ALL
SELECT column1, column2
FROM table2
INTO new_table

In this example, the INTO keyword is used to specify the name of the new table as "new_table".