From The Blog

MySQL: Select all tables that has a column with name

18 October 2016, in MySQL

How to select all tables that has a column / columns:

SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('column1','column2') AND TABLE_SCHEMA='database_name';



Post a Comment