If someone needs the opposite:
Find all the columns that exist in one table but are missing in another:
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS a
WHERE a.TABLE_NAME = 'craft_content'
AND a.TABLE_SCHEMA = 'craftcms2'
AND a.COLUMN_NAME NOT IN (
SELECT b.COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS b
WHERE b.TABLE_NAME = 'craft_content'
AND b.TABLE_SCHEMA = 'craftcms'
)
source
share