How to find all columns of a table in PostgreSQL

In this article, we will see how to find all columns of a table in PostgreSQL.

A postgresql table not only contains user defined columns. It also adds column names like xmin, xmax,….

Find the all column names: Continue reading How to find all columns of a table in PostgreSQL

How to drop multiple columns in PostgreSQL

In this article, we will see how to drop multiple columns in PostgreSQL with examples. We can drop columns by using alter table command.

Syntax to drop multiple columns in PostgreSQL
Continue reading How to drop multiple columns in PostgreSQL

How to get the PostgreSQL table structure

In this article, we are going to see How to get the PostgreSQL table structure. Table structure is nothing but to get the list of columns, datatypes and constrains information.

PostgreSQL table structure using meta command:

\d+ table_name;

Example:

\d+ dept

Output:
Continue reading How to get the PostgreSQL table structure