(SELECT field1 FROM Table1) UNION
(SELECT field1 FROM Table2);
This gets all rows from both tables.
Is there a way to add the tablename into the results to make it easier to see where the record originated from? eg using an IF table1 then prepend a string to record?
An example record I currently get is
banana
I would like
t1-banana or t2-banana
1 Answer