How to get a list column names and datatype of a table in PostgreSQL?

Pratik picture Pratik · Nov 25, 2013 · Viewed 121.3k times · Source

With the following query, we can get a list of column names and datatype of a table in PostgreSQL.

Answer

Marouane Afroukh picture Marouane Afroukh · Aug 16, 2016

Open psql command line and type :

\d+ table_name