I'm trying to get, in a single query, two sets of data into the same list.
For example:
Table1
id serial,
title varchar
Table2
id serial,
title varchar
Similar tables, I want to get a list of everything from Table1, and Table2, together.
EG: "(select * from Table1) + (select * from Table2)" so that I get all the records from BOTH.
I've tried a cartesian join, but that doesn't seem to cut the mustard, since I end up with TWO title fields and TWO id fields in a double-wide table.
The results would look like
id title
-------------
1 abc
1 xyz
2 lmn
2 opq
and so on, single wide.
Is this possible without creating a third table?
For example:
Table1
id serial,
title varchar
Table2
id serial,
title varchar
Similar tables, I want to get a list of everything from Table1, and Table2, together.
EG: "(select * from Table1) + (select * from Table2)" so that I get all the records from BOTH.
I've tried a cartesian join, but that doesn't seem to cut the mustard, since I end up with TWO title fields and TWO id fields in a double-wide table.
The results would look like
id title
-------------
1 abc
1 xyz
2 lmn
2 opq
and so on, single wide.
Is this possible without creating a third table?