This database query doesn't work:
select table_schema,
table_name,
column_name,
column_name2
from information_schema.columns
where column_name = 'user_id' and column_name2 = 'organisation_id'
and table_schema = 'brand_production';
I would like to search for each table in the database to see if it contains "user_id" and "organisation_id"?
Best Answer
To include views:
To only include tables: