Skip to content

HELP

Return help text for a SQL command.

HELP [ command ]

For example:

yellowbrick=# help cancel;
 COMMAND |       DESCRIPTION       |     SYNTAX      
---------+-------------------------+-----------------
 CANCEL  | Cancel a running query. | CANCEL query_id
(1 row)
yellowbrick=# help drop view;
  COMMAND  |         DESCRIPTION          |                           SYNTAX                            
-----------+------------------------------+-------------------------------------------------------------
 DROP VIEW | Drop a view from a database. | DROP VIEW [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
(1 row)

If you do not specify a command, HELP returns a list of all SQL commands. The HELP command returns the same output as the ybsql \h command.

Parent topic:SQL Commands