PostgreSQL Commands Flashcards
Learn brief description of the SQL commands supported by PostgreSQL. Source: PostgreSQL documentation.
BEGIN
[ WORK | TRANSACTION ]
Starts a transaction block. Different meaning in embedded SQL. Use START TRANSACTION instead.
ABORT
[ WORK | TRANSACTION ]
Aborts the current transaction; historical, use ROLLBACK instead
START TRANSACTION
Starts a transaction block.
ROLLBACK
[ WORK | TRANSACTION ]
Aborts the current transaction.
SET TRANSACTION
Set the characteristics of the current transaction.
COMMIT
[ WORK | TRANSACTION ]
Commits the current transaction.
END
[ WORK | TRANSACTION ]
Commits the current transaction. PostgreSQL extension. Use COMMIT instead.
REINDEX
Rebuild indexes
VACUUM
Garbage-collect and optionally analyze a database.
ANALYZE
Collect statistics about a database table for use by the query planner.
SHOW [ALL | name]
Show the value of a run-time parameter.
SET [ SESSION | LOCAL ]
Change a run-time parameter.
RESET
Restore the value of a run-time parameter to the default value.
SELECT
Retrieve rows from a table or view.
FROM Clause
The FROM clause specifies one or more source tables for the SELECT.