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 DATABASEstatement. -
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 TABLEstatement. -
PostgreSQL Drop Tables
This article describes how to use theDROP TABLEstatement. -
PostgreSQL Alter tables
This article describes how to use theALTER TABLEstatement to modify an existing table. -
PostgreSQL Rename Tables
This article describes how to rename a table using theALTER TABLEstatement. -
PostgreSQL Add Columns
In this article, you will learn how to add one or more columns to a table using PostgreSQLALTER TABLE ... ADD COLUMNstatements. -
PostgreSQL Rename Columns
In this article, you will learn how to rename one or more columns using PostgreSQLALTER TABLE ... RENAME COLUMNstatements. -
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 NULLconstraints 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 INTOstatement 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.