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".
Asked: 2023-05-04 15:10:20 +0000
Seen: 8 times
Last updated: May 04 '23