Page 1 of 1

Select result from 2 tables and join them in 1 query

Posted: Sun Jun 14, 2015 6:45 pm
by mister_v
Hello,

I would like to get the result from 1 table and the result from another table,
put them in 1 query and have the result in 1 column.

So inner join is not what I want to use.


table1: table2:
Name Name
a1 A2
b1 B2
c1 C2

The result should be something like this:
Name
a1
b1
c1
A2
B2
C2


Is it possible?

Re: Select result from 2 tables and join them in 1 query

Posted: Sun Jun 14, 2015 7:39 pm
by chris
You can use union

Code: Select all

SELECT name FROM table1 UNION SELECT name FROM table2;
that should work :-)