Friday , November 22 2024

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”.

Loading

About Faruk Erdem

Leave a Reply

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