DB2 Server for VSE & VM: Interactive SQL Guide and Reference


Obtaining Online HELP Information at a Terminal

The database manager offers online HELP information that provides you with, for example, information about ISQL commands; this saves you time in looking up the commands in Chapter 10, "ISQL Commands".

Online HELP information is available for:

Online HELP information is not supported on non-DB2 Server for VSE & VM application servers.

Selecting Online HELP Information

Online HELP information may also have been installed on your system in languages other than English. If you want to read HELP information in one of these other languages, you can specify the language for online HELP using the SET LANGUAGE command, which is discussed in Language of Messages and HELP Text and in Chapter 10, ISQL Commands.

The database manager online HELP information is stored in a table and displayed in the same manner as queries. After you have retrieved some information, you can use display commands to move through it. The online information is broken up into many topics. Each topic is identified by a name. Most topic names are either a statement name (such as SELECT or INSERT), a message number (such as ARI7399I or ARI7307A), a message code (such as -205 or 100), or an SQLSTATE (such as SQLSTATE 01525). For example, to retrieve the online help information for the UPDATE statement, type:

   help update

To move forward through the UPDATE information, type FORWARD commands until you have reached the end. See Results That Have Too Many Rows for One Display for more information about FORWARD. Type the END command to end the display.

Some topic names have more than one word. When retrieving these topics, enclose the topic name in single quotation marks. For example, to retrieve the online help information for search conditions, type:

   help 'search conditions'

To see a list of the topics available, type:

   help contents

To obtain a list of topics, and a description of how to use the HELP command, press PF1 or type:

   help

Typing While Viewing Online HELP Information

You can type commands and statements while online HELP information is being displayed. This is particularly useful when you want to type a statement, and you know all the necessary column and table name information, but you cannot remember the correct format for the statement.

If you want to execute a SELECT statement but cannot remember its format, type:

   help select

This displays online HELP information for the SELECT statement similar to the following:



interactive-select-statement

>>-| fullselect |--+----------------------------------------------+->
                   |           .-,-----------------------------.  |
                   |           V                     .-ASC--.  |  |
                   '-ORDER BY------+-column_name-+---+------+--+--'
                                   '-integer-----'   '-DESC-'
 
>----+---------------+-----------------------------------------><
     '-WITH--+-RR-+--'
             +-CS-+
             '-UR-'
 
 
fullselect
 
|--+-subselect----+--------------------------------------------->
   '-(fullselect)-'
 
      .------------------------------------------.
      V                                          |
>--------+------------------------------------+--+--------------|
         '--+-UNION-----+---+-subselect----+--'
            '-UNION ALL-'   '-(fullselect)-'
 
 
subselect
 
             .-ALL------.
|--SELECT----+----------+---+-*----------------------------+---->
             '-DISTINCT-'   |  .-,-----------------------. |
                            |  V                         | |
                            '----+-expression---------+--+-'
                                 +-table_name.*-------+
                                 +-view_name.*--------+
                                 '-correlation_name.*-'
 
           .-,-----------------------------------------.
           V                                           |
>----FROM------+-table_name-+---+------------------+---+-------->
               '-view_name--'   '-correlation_name-'
 
>-----+--------------------------+------------------------------>
      '-WHERE--search_condition--'
 
>-----+-------------------------------+------------------------->
      |           .-,--------------.  |
      |           V                |  |
      '-GROUP BY-----column_name---+--'
 
>-----+---------------------------+-----------------------------|
      '-HAVING--search_condition--'
 

Figure 10. A Query Result after Using Online HELP Information

+--------------------------------------------------------------------------------+
| PROJNO  PRSTAFF                                                                |
| ------  -------                                                                |
| IF2000     1.00                                                                |
| OP2012     1.00                                                                |
| OP2013     1.00                                                                |
| OP2011     1.00                                                                |
| PL2100     1.00                                                                |
| AD3112     1.00                                                                |
| MA2111     2.00                                                                |
| IF1000     2.00                                                                |
| AD3113     2.00                                                                |
| AD3111     2.00                                                                |
| * End of Result *** 10 Rows Displayed ***Cost Estimate is 1********************|
+--------------------------------------------------------------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]