SQL Commands

NOTE: this part of help system is copied from PostgreSQL 7.3.1 documentation to provide you quick reference to SQL commands descriptions only. Please see PostgreSQL documentation for details.

This part contains reference information for the SQL commands supported by PostgreSQL. By "SQL" the language in general is meant; information about the standards conformance and compatibility of each command can be found on the respective reference page.

Table of Contents
ABORTabort the current transaction
ALTER DATABASEchange a database
ALTER GROUPadd users to a group or remove users from a group
ALTER TABLEchange the definition of a table
ALTER TRIGGERchange the definition of a trigger
ALTER USERchange a database user account
ANALYZEcollect statistics about a database
BEGINstart a transaction block
CHECKPOINTforce a transaction log checkpoint
CLOSEclose a cursor
CLUSTERcluster a table according to an index
COMMENTdefine or change the comment of an object
COMMITcommit the current transaction
COPYcopy data between files and tables
CREATE AGGREGATEdefine a new aggregate function
CREATE CASTdefine a user-defined cast
CREATE CONSTRAINT TRIGGERdefine a new constraint trigger
CREATE CONVERSIONdefine a user-defined conversion
CREATE DATABASEcreate a new database
CREATE DOMAINdefine a new domain
CREATE FUNCTIONdefine a new function
CREATE GROUPdefine a new user group
CREATE INDEXdefine a new index
CREATE LANGUAGEdefine a new procedural language
CREATE OPERATORdefine a new operator
CREATE OPERATOR CLASSdefine a new operator class for indexes
CREATE RULEdefine a new rewrite rule
CREATE SCHEMAdefine a new schema
CREATE SEQUENCEdefine a new sequence generator
CREATE TABLEdefine a new table
CREATE TABLE AScreate a new table from the results of a query
CREATE TRIGGERdefine a new trigger
CREATE TYPEdefine a new data type
CREATE USERdefine a new database user account
CREATE VIEWdefine a new view
DEALLOCATEremove a prepared query
DECLAREdefine a cursor
DELETEdelete rows of a table
DROP AGGREGATEremove a user-defined aggregate function
DROP CASTremove a user-defined cast
DROP CONVERSIONremove a user-defined conversion
DROP DATABASEremove a database
DROP DOMAINremove a user-defined domain
DROP FUNCTIONremove a user-defined function
DROP GROUPremove a user group
DROP INDEXremove an index
DROP LANGUAGEremove a user-defined procedural language
DROP OPERATORremove a user-defined operator
DROP OPERATOR CLASSremove a user-defined operator class
DROP RULEremove a rewrite rule
DROP SCHEMAremove a schema
DROP SEQUENCEremove a sequence
DROP TABLEremove a table
DROP TRIGGERremove a trigger
DROP TYPEremove a user-defined data type
DROP USERremove a database user account
DROP VIEWremove a view
ENDcommit the current transaction
EXECUTEexecute a prepared query
EXPLAINshow the execution plan of a statement
FETCHretrieve rows from a table using a cursor
GRANTdefine access privileges
INSERTcreate new rows in a table
LISTENlisten for a notification
LOADload or reload a shared library file
LOCKexplicitly lock a table
MOVEposition a cursor on a specified row of a table
NOTIFYgenerate a notification
PREPAREcreate a prepared query
REINDEXrebuild corrupted indexes
RESETrestore the value of a run-time parameter to a default value
REVOKEremove access privileges
ROLLBACKabort the current transaction
SELECTretrieve rows from a table or view
SELECT INTOcreate a new table from the results of a query
SETchange a run-time parameter
SET CONSTRAINTSset the constraint mode of the current transaction
SET SESSION AUTHORIZATIONset the session user identifier and the current user identifier of the current session
SET TRANSACTIONset the characteristics of the current transaction
SHOWshow the value of a run-time parameter
START TRANSACTIONstart a transaction block
TRUNCATEempty a table
UNLISTENstop listening for a notification
UPDATEupdate rows of a table
VACUUMgarbage-collect and optionally analyze a database

This file was copied from PostgreSQL 7.3.1 help system.