php - Find equal columns in different tables in mysql -
there 3 tables, each 1 having approximatelly 60 columns , have find common columns between them.
is there way find automatically common columns between 3 different tables?
select distinct column_name, count(table_name) common_count information_schema.columns table_name in ('table1', 'table2', 'table3') , table_schema = 'dbname' group table_schema, column_name having common_count > 1
Comments
Post a Comment