Category: Table
-
Drop column
In this section, we are going to discuss how we can drop the columns with the help of the ALTER TABLE command. PostgreSQL DROP COLUMN Command We will use the DROP COLUMN condition in the ALTER TABLE command for dropping a column of a table: PostgreSQL will automatically delete all of its constraints and indexes, including the column while deleting a column…
-
ADD Columns
In this section, we are going to understand how the PostgreSQL ADD COLUMN Command is used to add one or more columns to the current database table. PostgreSQL ADD COLUMN command We will use the alter table add column, command for adding the new column to an existing table. Syntax The syntax of the Alter add column command is…
-
PostgreSQL ALTER table
In this section, we are going to learn the various commands of PostgreSQL ALTER TABLE for changing the structure of a table. PostgreSQL ALTER TABLE command We use PostgreSQL alter table command to change the current table structure. The syntax of the alter table is given below: The below table will show the following ALTER TABLE commands modifications: Description Commands We will use…
-
Show table
In this section, we are going to learn how we can show the tables in PostgreSQL. The list or show table is significant when we have many databases, which has several tables. Sometimes the table names are the same in various databases; in that case, the show table command is very beneficial. In PostgreSQL, we can…
-
Drop/Delete Table
In PostgreSQL, we can use the Drop table command to delete the existing table or which we don’t need anymore. This command deletes the complete data of a table along with the whole structure or definition permanently from the database. So, we must be very alert while deleting the table because we cannot recover the…
-
Create Table
In PostgreSQL, the Create table command is used to create a new table in any of the given databases. In this section, we are going to learn how we can create a table in PostgreSQL. Syntax of creating table in PostgreSQL Here, In the above syntax, the CREATE TABLE is a keyword, which used the database system for creating…