Answer the question
In order to leave comments, you need to log in
How to see if a column exists in at least some table of the current schema?
Hello! I have a schema that has a fairly large number of tables. How can I check that at least one table has the column I need?
Answer the question
In order to leave comments, you need to log in
select table_name from information_schema.columns where column_name = ? and table_schema = ?;
the algorithm is simple: get a list of tables and check each one :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question