Was this helpful?
HELP
Valid in: SQL
The HELP statement displays information about database objects and SQL statements, including object name, owner, and type for all tables, views, and indexes to which the user has access, and all synonyms owned by the user. System tables and temporary tables are not listed. Information is displayed in a one-line-per-object format.
In general, to display high-level information, specify HELP objectname (for example, HELP mytable). To display detailed information, specify HELP object_type object_name (for example, HELP TABLE mytable).
The asterisk wildcard character can be used in object name specifications to display information about a selected set of objects. For details, see Wildcards in Help Statement.
Syntax
The HELP statement has the following format:
HELP [[schema.]objectname {, [schema.]objectname}]
HELP COMMENT COLUMN [schema.]table column_name {, column_name}
HELP COMMENT TABLE [schema.]table {, [schema.]table }
HELP CONSTRAINT [schema.]tablename  
              {, [schema.]constraint_name}
HELP DEFAULT [schema.]tablename
HELP HELP
HELP INDEX [schema.]indexname {, [schema.]indexname}
HELP INTEGRITY [schema.]tablename {, [schema.]tablename}
HELP PERMIT ON DBEVENT
               [schema.]objectname  {, [schema.]objectname}
HELP PERMIT ON PROCEDURE | TABLE | VIEW
               [schema.]object_name  {, [schema.]object_name}
HELP PROCEDURE [schema.]procedurename
              {, [schema.]procedurename}
HELP REGISTER [schema.]objectname 
HELP RULE [schema.]rulename {, [schema.]rulename}
HELP RULES [ON [TABLE]] [schema.]tablename {, [schema.]tablename}
HELP SECURITY_ALARM [ON TABLE] tablename
HELP SECURITY_ALARM ON DATABASE database_name
HELP SECURITY_ALARM ON CURRENT INSTALLATION
HELP SEQUENCE [schema.]objectname 
HELP SQL [sql_statement]
HELP SYNONYM [schema.]synonym {, [schema.]synonym}
HELP TABLE [schema.]tablename {, [schema.]tablename}
HELP TABLE|INDEX name
HELP VIEW [schema.]view_name {, [schema.]view_name}
objectname
Specifies the name of a table, view, or index. Display format is block-style.
COMMENT COLUMN
Displays any comments defined for the specified columns.
COMMENT TABLE
Displays any comments defined for the specified tables.
CONSTRAINT
Displays any constraints defined on columns of the specified table or on the entire table. For details about table constraints, see CREATE TABLE.
These constraints are not the same as the integrities displayed by the HELP INTEGRITY statement.
DEFAULT
Displays any user-defined defaults defined on columns of the specified table.
HELP
Displays valid HELP statements.
INDEX
Displays detailed information about the specified indexes.
INTEGRITY
Displays any integrity constraints defined on the specified tables or indexes. Integrity constraints are defined using the CREATE INTEGRITY statement.
PERMIT ON DBEVENT
Displays information about the specified database event.
PERMIT ON PROCEDURE | TABLE | VIEW
For tables, displays the permit text. For other objects, displays the values required by the corresponding DROP PERMIT statement.
PROCEDURE
Displays detailed information about the specified procedure.
REGISTER
Displays information about registered objects. For details about registering objects, see REGISTER TABLE.
RULE
Displays the text of the CREATE RULE statement that defined the rule.
HELP RULES [ON [TABLE]]
Displays all rules defined for the specified tables.
SECURITY_ALARM [ON TABLE]
Displays all security alarms defined for the specified table. The information includes an index number that can be used to delete the security alarm (using the DROP SECURITY_ALARM statement).
SECURITY_ALARM ON DATABASE
Displays all security alarms defined for the specified database. The information includes an index number that can be used to delete the security alarm (using the DROP SECURITY_ALARM statement).
SECURITY_ALARM ON CURRENT INSTALLATION
Displays all security alarms defined for the current installation. The information includes an index number that can be used to delete the security alarm (using the DROP SECURITY_ALARM statement).
SEQUENCE
Displays detailed information about the specified sequence.
SQL
Displays information about the specified SQL statement. If the sql_statement parameter is omitted, displays a list of SQL statements for which help information is available.
SYNONYM
Displays information about the specified synonyms. To display all the synonyms you own, specify HELP SYNONYM *. To display all the synonyms you own plus all the synonyms to which you have access, specify HELP SYNONYM *.*.
TABLE
Displays detailed information about the specified tables.
TABLE | INDEX
Displays the cache priority.
VIEW
Displays detailed information about the specified views.
Wildcards in Help Statement
The asterisk (*) wildcard can be used to specify all or part of the owner or object name parameters in a HELP statement. The HELP statement displays only objects to which the user has access, which are:
Objects owned by the user
Objects owned by other users that have granted permissions to the user
Objects owned by the DBA to which you have access
If wildcards are specified for both the owner and object name (*.*), HELP displays all objects to which you have access. To display help information about objects you do not own, specify the owner name (using the schema.objectname syntax). If the owner name wildcard is omitted (that is, * is specified instead of *.*), HELP displays the objects that can be accessed without the owner prefix.
The following examples illustrate the effects of the wildcard character:
Wildcard
Description
HELP *
Display objects owned by the effective user of the session.
HELP davey.*
Display all objects owned by davey.
HELP *.mytable
Display all objects named, mytable, regardless of owner.
HELP d*.*
Display all objects owned by users beginning with d.
HELP *.d*
Display all objects beginning with d regardless of owner.
HELP *.*
Display all objects regardless of owner.
Permissions
This statement is available to all users.
Locking
The HELP statement does not take read locks on system catalogs. As a result, if the HELP statement is issued while a CREATE SCHEMA or CREATE TABLE AS SELECT statement is executing, the HELP statement can display results that do not reflect the final results of the CREATE statements.
Related Statements
COMMENT ON
CREATE DBEVENT
CREATE INDEX
CREATE INTEGRITY
CREATE PROCEDURE
CREATE RULE
CREATE SECURITY_ALARM
CREATE SEQUENCE
CREATE SYNONYM
CREATE TABLE
CREATE VIEW
Last modified date: 01/30/2023