Starting interactive SQL

To start using interactive SQL, enter STRSQL from an IBM® i command line.

The Enter SQL Statements display appears. This is the main interactive SQL display. From this display, you can enter SQL statements and use:

  • F4=prompt
  • F13=Session services
  • F16=Select collections
  • F17=Select tables
  • F18=Select columns
                             Enter SQL Statements
 
Type SQL statement, press Enter.
    Current connection is to relational database rdjacque.
===>_____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
    _____________________________________________________________________
 
                                                                    Bottom
F3=Exit   F4=Prompt   F6=Insert line   F9=Retrieve   F10=Copy line
F12=Cancel            F13=Services     F24=More keys
 
Press F24=More keys to view the remaining function keys.
     _____________________________________________________________________
     _____________________________________________________________________
     _____________________________________________________________________
     _____________________________________________________________________
 
                                                            Bottom
 
F14=Delete line   F15=Split line     F16=Select collections (libraries)
F17=Select tables                    F18=Select columns   F24=More keys
           (files)                              (fields)
Note: If you are using the system naming convention, the names in parentheses appear instead of the names shown above.

An interactive session consists of:

  • Parameter values you specified for the STRSQL command.
  • SQL statements you entered in the session along with corresponding messages that follow each SQL statement
  • Values of any parameters you changed using the session services function
  • List selections you have made

Interactive SQL supplies a unique session-ID consisting of your user ID and the current workstation ID. This session-ID concept allows multiple users with the same user ID to use interactive SQL from more than one workstation at the same time. Also, more than one interactive SQL session can be run from the same workstation at the same time from the same user ID.

If an SQL session exists and is being re-entered, any parameters specified on the STRSQL command are ignored. The parameters from the existing SQL session are used.