PostgreSQL Databases and Tables
This chapter introduces the operations related to databases and tables in PostgreSQL, including creating and deleting databases, creating and deleting tables, modifying table columns, primary keys, data constraints, and data types.
-
PostgreSQL Create Databases
This article describes how to create a new database in PostgreSQL. -
PostgreSQL Drop Databases
PostgreSQL allows you to drop an existing database using theDROP DATABASE
statement. -
PostgreSQL Alter Databases
This article describes how to modify a database in PostgreSQL. -
PostgreSQL Rename Databases
This article describes the detailed steps to rename a database in PostgreSQL. -
PostgreSQL Create Tables
This article describes how to create a new table using theCREATE TABLE
statement. -
PostgreSQL Drop Tables
This article describes how to use theDROP TABLE
statement. -
PostgreSQL Alter tables
This article describes how to use theALTER TABLE
statement to modify an existing table. -
PostgreSQL Rename Tables
This article describes how to rename a table using theALTER TABLE
statement. -
PostgreSQL Add Columns
In this article, you will learn how to add one or more columns to a table using PostgreSQLALTER TABLE ... ADD COLUMN
statements. -
PostgreSQL Rename Columns
In this article, you will learn how to rename one or more columns using PostgreSQLALTER TABLE ... RENAME COLUMN
statements. -
PostgreSQL Primary Keys
In this article, you introduced what a primary key is, its rules, and how to use it in PostgreSQL. -
PostgreSQL FOREIGN KEY
In this article, we introduce what foreign keys are, their rules, and how to use them in PostgreSQL. -
PostgreSQL NOT NULL
PostgreSQLNOT NULL
constraints are used to restrict column values from being nullable. -
PostgreSQL Generated Columns
The values of a PostgreSQL generated columns are always automatically calculated from other columns. -
PostgreSQL Identity Columns
PostgreSQL identity columns are used to define a column that can automatically generate unique values. -
PostgreSQL CHECK
In this article, you will learn how to use PostgreSQL CHECK constraints to ensure that data written to a table is correct. -
PostgreSQL SEQUENCE
In this article, we covered how to create, use, and drop sequences in PostgreSQL. -
PostgreSQL SELECT INTO
This article describes how to use theSELECT INTO
statement create a new table from a result set. -
PostgreSQL Schema
This article discusses the basic usage of PostgreSQL schemas, including creating schemas, modifying schemas, and dropping schemas.