Verwenden Sie union für Ihr Problem. Weitere Details finden Sie unter union
in diesem Link
SELECT
table_one.col_1,
table_one.col_2,
'table_one' AS from_table
FROM
table_one
WHERE
table_one.field = 'some_val'
UNION
SELECT
table_two.col_1,
table_two.col_2,
'table_two' AS from_table
FROM
table_two
WHERE
table_two.field = 'some_val'