Använd union för ditt problem. Du kan hitta mer information om union
i denna länk
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'