How to find a table having a specific column in postgresql

Hasan Iqbal picture Hasan Iqbal · Aug 29, 2013 · Viewed 61.5k times · Source

I'm using PostgreSQL 9.1. I have the column name of a table. Is it possible to find the table(s) that has/have this column? If so, how?

Answer

Ravi Shekhar picture Ravi Shekhar · Jul 30, 2015

You can also do

 select table_name from information_schema.columns where column_name = 'your_column_name'