HELP

2023-07-28 02:55:42  Updated

Purpose

You can call this function to return the search results in the help table. The search string can contain percent signs (%) and underscores (_).

Note

You must load the help tables before you can use the HELP function. Procedure:

  1. Copy the fill_help_tables-ob.sql file to the tmp directory of the client.
  2. Log on to the sys tenant and execute the source /tmp/fill_help_tables-ob.sql statement.

The search string can match a category or one or more topics.

  • Query the list of top-level help categories:

    HELP 'contents';
    
  • Query the topics of a help category. For example, search for data types:

    HELP 'data_types';
    
  • Use one or more associated keywords to query a specific help topic:

    HELP 'create table'
    

    The query results 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 Queries the directories of all help information. You can further search for help information by directory name.
data_types Queries the help information of a specified data type.
theme Queries the help information of a specified topic.

Examples

  • Query the directories of all help information.

    obclient> HELP 'contents';
    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
       Utility
    
  • Query the numeric data types.

    obclient> HELP 'Numeric Types';
    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
       NUMERIC
    
  • Query the method for using the KILL statement.

    obclient> HELP 'KILL';
    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 query the ongoing threads and use the KILL thread_id statement to terminate a thread.
    
    • KILL CONNECTION terminates the connection with the specified thread ID, like the KILL statement without a modifier.
    
    • KILL QUERY terminates the ongoing statement of the connection but retains the current status of 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 view and terminate only your own threads and statements.
    
  • Query the syntax of the SELECT statement.

    obclient> HELP SELECT
    Name: 'SELECT'
    Description:
    
      You can use this statement to query data from 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];
    

Contact Us