Reputation: 1846
I know that I have a table with the column "fortyid" but I cant remember which table it is and I have like 350 tables in my database. Is there a way to find all tables that has "fortyid" as column? (doesn't matter the type)
Upvotes: 1
Views: 37
Reputation: 1269753
You can use the metadata defined by the SQL standard, specifically INFORMATION_SCHEMA.COLUMNS
.
select c.*
from information_schema.columns c
where c.column_name = 'fortyid';
Upvotes: 6