Friday , October 7 2022

How to List Table Columns and Data Types On Postgresql


If you don’t use PG ADMIN or any other similar application and you want to see the data type in the columns of the table you created, the command below will help you. You need to connect to postgres to run this command.


In the example above, we see that we have columns in integer and text types named s and md5.

If you want more detailed, just type \d+.

The following command lists column names and types for all tables beginning with “dl”.

Faruk Erdem
Author: Faruk Erdem

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *