This section provides a comprehensive reference for the SQL commands and functions supported by PostgreSQL. Whether you are a beginner or an experienced user, this guide will help you understand how to effectively use SQL with PostgreSQL.
Common SQL Commands
SELECT
: Retrieve data from a database.INSERT
: Add new data into a database.UPDATE
: Modify existing data in a database.DELETE
: Remove data from a database.CREATE
: Define a new database object, such as a table or view.DROP
: Remove a database object.
Functions
COUNT()
: Returns the number of rows that match a specified criterion.SUM()
: Calculates the total sum of a numeric column.AVG()
: Calculates the average value of a numeric column.MAX()
: Returns the maximum value in a column.MIN()
: Returns the minimum value in a column.
Example
To retrieve all columns from a table named "users", you would use the following SQL command:
SELECT * FROM users;
For more information on SQL commands and functions in PostgreSQL, please visit our SQL Reference Guide.
PostgreSQL Logo