mysql - How to find out which columns are similar in two sql tables based on their values? -
i have 2 tables in mysql 100+ columns. need figure out columns in both tables have of same values. need way find out columns matching in terms of type , values in them can use them in joins , extract results them. can convert tables in excel sheet , apply vb script well. kind of appreciated.
there's no magical sql query can run determine logic behind how database designed. can check table schema see if there foreign keys enabled, that's it.
select * information_schema.columns table_schema = 'my_database_name' , table_name ='my_table';
based on how describe tables, given design sounds... odd. hope whoever designed left documentation. last resort going dumping data , looking patterns.
Comments
Post a Comment