Use this:
SELECT DISTINCT column_1 AS keywords, 'table_1' AS tablename FROM table_1 UNION ALL SELECT DISTINCT column_2 AS keywords, 'table_2' AS tablename FROM table_2
It adds another tablename column to the result set, which contains the name of the source table.
source share