Previously got a situation where I needed to get the list of all the tables where a particular column lets say partner_id exists, might be useful for you too.
Just run the following query in PostgreSQL:
SELECT * FROM information_schema.columns WHERE column_name = 'partner_id'
You will see the list of all the tables where partner_id column exists.
0 Comment(s)