Purpose
Returns the search results from the help table. The search string can contain the wildcard percent sign (%) and underscore (_).
Note
The HELP feature requires loading the help tables for proper use. The procedure is as follows:
- 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 to the sys tenant and execute the statement
source /tmp/fill_help_tables-ob.sql.
A search string can match one category, multiple topics, or a single topic:
View the list of top-level help categories:
HELP 'contents';View topics in each help category. For example, to search for data types, enter
data types:HELP 'data_types';For a specific help topic, you can use one or more associated keywords:
HELP 'create table'The returned topic contains the following information:
name: The name of the topic.description: The descriptive help text for this topic.
Syntax
HELP 'search_string';
search_string:
contents | data_types | theme
Parameters
Parameter |
Description |
|---|---|
| contents | You can view the directory of all help topics and search for more information by topic name. |
| data_types | View help information for a specified data type. |
| theme | View the help information for a specified topic. |
Examples
View the table of contents for all help topics.
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.
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 runs in its own thread. You can use the SHOW PROCESSLIST; statement to view which threads are running, and use the KILL thread_id statement to terminate a thread. • KILL CONNECTION is the same as KILL without a modifier: it terminates the connection with the given thread_id. • KILL QUERY terminates the statement currently being executed by the connection, but preserves the connection. 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 queries 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];