SELECT column_name, data_type
FROM information_schema.columns
WHERE table_schema = 'back_office'
AND table_name = 'pension_calculation'
AND ordinal_position < 30
ORDER BY ordinal_position
SELECT table_name
FROM information_schema.columns
WHERE table_schema IN ('back_office', 'ourpension')
AND column_name = 'contract_id'
GROUP BY table_name
ORDER BY table_name