Purpose
Returns search results from the help tables. The search string can contain wildcards such as the percent sign (%) and the underscore (_).
Note
To use the HELP feature, you must load the help tables by following these steps:
- Copy the
fill_help_tables-ob.sqlfile to thetmpdirectory on the client machine. Thefill_help_tables-ob.sqlfile is located in theetcdirectory of the OceanBase installation directory. - Log in as the sys tenant and execute the statement
source /tmp/fill_help_tables-ob.sql.
The search string can match one or more topics within a category, or a single topic:
View the list of top-level help categories:
HELP 'contents';View the topics within a help category, for example, search for data types
data types:HELP 'data_types';For a specific help topic, you can use one or more associated keywords:
HELP 'create table'The returned topics contain the following information:
name: the name of the topic.description: the descriptive help text for the topic.
Syntax
HELP 'search_string';
search_string:
contents | data_types | theme
Parameters
| Parameter | Description |
|---|---|
| contents | The directory containing all help information. You can continue to search for help information by directory name. |
| data_types | The directory containing help information for a specified data type. |
| theme | The directory containing help information for a specified topic. |
Examples
View the directory containing all help information.
obclient> HELP 'contents';The execution result is as follows:
You asked for help about help category: "Contents" For more information, type 'help <item>', where <item> is one of the following categories: Data Types Functions Operator Escape character Data Definition Data Manipulation Transaction Statements Prepared Statements Compound Statements Administration UtilityView the data types included in the Numeric Type category.
obclient> HELP 'Numeric Types';The execution result is as follows:
You asked for help about help category: "Numeric Types" For more information, type 'help <item>', where <item> is one of the following topics: TINYINT BOOL,BOOLEAN SMALLINT MEDIUMINT INT INTEGER BIGINT FLOAT DOUBLE DOUBLE PRECISION FLOAT(p) DECIMAL NUMERICView the usage of the
KILLstatement.obclient> HELP 'KILL';The execution result is as follows:
Name: 'KILL' Description: Syntax: KILL [GLOBAL | LOCAL] [CONNECTION | QUERY] 'sessionid' Each connection to OceanBase Database runs in an independent thread. You can use the SHOW PROCESSLIST; statement to view the running threads and use the KILL thread_id statement to terminate a thread. • KILL CONNECTION is the same as KILL without modifiers: it terminates the thread with the given thread_id. • KILL QUERY terminates the statement currently being executed by the connection, but keeps the connection open. If you have the PROCESS privilege, you can view all threads. If you have the SUPER privilege, you can terminate all threads and statements. Otherwise, you can only view and terminate your own threads and statements.View the syntax of the
SELECTstatement.obclient> HELP SELECT;The execution result is as follows:
Name: 'SELECT' Description: This statement is used to query the contents of a table. Basic query Syntax: SELECT [ALL | DISTINCT] selectexpr [AS othername] [, selectexpr ...] [FROM table_references] [WHERE where_conditions] [GROUP BY group_by_list] [HAVING search_confitions] [ORDER BY order_list] [LIMIT {[offset,] rowcount | rowcount OFFSET offset}] [FOR UPDATE];
