U kunt dit bereiken door alle kolomnamen te selecteren uit table2
die niet verschijnen ook in table1
:
SELECT column_name
FROM information_schema.columns
WHERE table_schema = 'your_schema' AND table_name = 'table2'
AND column_name NOT IN
(
SELECT column_name
FROM information_schema.columns
WHERE table_schema = 'your_schema' AND table_name = 'table1'
)