Search code examples
sqltalend

How to select parameters from different tables in one column sql?


I have two tables with name of countries. I need to do select, which will show first countries names from first table and then from second table.

table1: USA Germany

table2: Spain Ukraine

Expected result from select:

USA
Germany
Spain
Ukraine

Solution

  • Use this query:

    SELECT * FROM table1
    UNION ALL
    SELECT * FROM table2