把两个表中不相同的字段名称列出来

SELECT 
  table_name,
  column_name 
FROM
  information_schema.`COLUMNS` 
WHERE table_schema = 'xxxdb' 
  AND FIND_IN_SET(table_name, 'xxx_proj,xxx_proj_history') 
GROUP BY column_name 
HAVING COUNT(1) = 1 ;



你可能感兴趣的:(把两个表中不相同的字段名称列出来)