Find all tables with column name in SQL

If you have wondered how can you get all the table names which contain a specific column, here is a simple SQL query to find all tables with column name in SQL.

Find all tables with column name

select column_name, table_name from information_schema.columns where column_name like "%mycolumname%";
or
select column_name, table_name from information_schema.columns where column_name = "mycolumname";

Add a Comment

Your email address will not be published. Required fields are marked *