Is there a way in MySQL to compare two rows of same column structure and find out which column values have changed?
SELECT id AS primary_key,
tableA.first_name AS old_value,
tableB.first_name AS new_value,
'first name' AS altered_column
FROM tableA
JOIN tableB ON tableA.id = tableB.id
AND tableA.first_name <> tableB.first_name
UNION ALL
SELECT id,
tableA.last_name,
tableB.last_name,
'last name'
FROM tableA
JOIN tableB ON tableA.id = tableB.id
AND tableA.last_name <> tableB.last_name
ORDER BY primary_key;