DB2 Server for VSE & VM: Interactive SQL Guide and Reference
About This Manual
Summary of Changes
Chapter 1. Getting Started
Introducing the DB2 Server for VSE & VM Database Manager
Introducing ISQL
Introducing the ISQL Display Terminal
Using the Program Function Keys
Defining the ISQL Session
Using DBCS for DB2 Server for VM
Before Starting ISQL
DB2 Server for VSE
DB2 Server for VM
Starting ISQL for DB2 Server for VSE
Alternative Methods for Starting ISQL
Starting ISQL for DB2 Server for VM
Controlling the Display
Interpreting DB2 Server for VSE & VM Messages
Entering Commands
DB2 Server for VSE
DB2 Server for VM
Entering Commands While Viewing the Results of a Query
Understanding ISQL Modes
Using the Continuation Character
Correcting Typing Errors
Canceling Running Commands
Obtaining Online HELP Information at a Terminal
Selecting Online HELP Information
Typing While Viewing Online HELP Information
Using ISQL on a Non-DB2 Server for VM Application Server (VM Only)
Using ISQL on a Remote Application Server (VSE Only)
Stopping ISQL
Using CHARNAME and DBCS Options in VSE
Chapter 2. Querying Tables
Selecting Columns
|Using Query Results
|Displaying Query Results
|Results That Have Too Many Rows for One Display
|Results That Are Too Wide for One Display
Ending a Query Display
Obtaining a Printed Report
Obtaining Multiple Copies of a Printed Report
Using More Than One Keyword with the Print Command
Chapter 3. Managing Table Data
Controlling Changes to Table Data
Using the AUTOCOMMIT ON Setting
Using the AUTOCOMMIT OFF Setting
Interpreting Messages While Making Changes
Interpreting Errors While Making Changes
Chapter 4. Using ISQL Commands to Save Time When Executing Statements
Reusing the Current SQL Statement
Retrieving and Correcting SQL Lines
Altering and Reusing SQL Lines
Changing the Current SQL Statement
Correcting Typing Errors in the Statement
Altering and Reusing the Statement
Deleting Portions of the Statement
Ignoring an SQL Line
Preventing the Immediate Processing of an SQL Statement
Using Placeholders in SQL Statements
Chapter 5. Formatting Query Results
Formatting Columns
Creating a Report from Query Results
Modifying the Separation between Columns
Excluding Columns from the Display
Including Columns in the Display
Changing a Displayed Column Heading
Changing the Number of Decimal Places Displayed
Controlling the Display of Leading Zeros
Changing the Displayed Length Attribute of a Column
Formatting Reports
Obtaining an Outline Report Format
Obtaining Totals for Reports
Creating Titles for Printed Reports
Using More Than One Keyword in a FORMAT Command
Displaying Null Values and Arithmetic Errors
Controlling Null-Field Displays
Controlling Query Format Characteristics
Setting the Format Characteristics by Using the SET Command
Printing Reports on a Workstation Printer (DB2 Server for VSE)
Chapter 6. Storing SQL Statements
Storing the Current Statement
Protecting a Stored Statement
Starting a Stored Statement
Starting a Stored Statement That Contains Placeholders
Recalling a Stored Statement
Saving the Format Information
Changing a Stored Statement
Listing the Names of Stored Statements
Renaming a Stored Statement
Erasing a Stored Statement
Chapter 7. Creating and Using Routines
Running Routines When ISQL Is Started
Profile Routines
Routines to Which Parameters Can Be Passed (DB2 Server for VM)
Using the ISQL Transaction Identifier (DB2 Server for VSE)
Establishing Where Routines Are Stored
Storing a Routine
Managing a Routine
Running a Routine
Running Shared Routines
Error Mode Processing in a Routine
Using INPUT Commands in a Routine
Using SELECT Statements in a Routine
Chapter 8. Creating and Managing Tables
Managing Your Own Tables
Querying Information about Your Tables
Creating Your Own Tables
Storing Your Tables
Copying Data from Other Tables
Dropping a Table
Identifying the Minimum Contents of a Table
Adding a Column to a Table
Specifying Referential Constraints
Creating a Table That Contains a Primary Key
Adding a Primary Key to an Existing Table
Creating a Table That Contains a Foreign Key
Adding a Foreign Key to an Existing Table
Activating and Deactivating Primary Keys, Foreign Keys, or Unique Constraints
Determining Effects on Stored Format Information
Sharing Your Tables with Other Users
Granting Privileges to Multiple Users
Using a View to Restrict Privileges to Certain Rows
Using a View to Restrict Privileges to Certain Columns
Creating Tables That You Want to Share
Accessing Tables Belonging to Other Users
Using Synonyms
Improving Query Performance
Indexing a Table
Maintaining Updated Statistics
Locking Data
Chapter 9. Using VM Functions
CMS-Subset Processing
Returning to ISQL from CMS Subset Mode
Entering CP Commands
Obtaining Printed Reports on a Workstation Printer
Specifying the Number of Copies of Printed Reports
Using EXEC Files
Stacking Commands in an EXEC File
Prompting by Using an EXEC File
Starting ISQL from a Terminal
Disconnecting after Starting ISQL
Chapter 10. ISQL Commands
BACKOUT
BACKWARD
CANCEL
CHANGE
COLUMN
COUNTER
DISPLAY
END
ERASE
EXIT
FORMAT
FORWARD
HELP
HOLD
IGNORE
INPUT
Interactive Select
ISQLTRACE
LEFT
LIST
PRINT
RECALL
RENAME
RIGHT
RUN
SAVE
SET
SHOW
START
STORE
TAB
Example
Appendix A. Answers to the Exercises
Appendix B. Sample Tables
DEPARTMENT Table
Relationship to Other Tables
EMPLOYEE Table
Relationship to Other Tables
PROJECT Table
Relationship to Other Tables
ACTIVITY Table
Relationship to Other Tables
PROJ_ACT Table
Relationship to Other Tables
EMP_ACT Table
Relationship to Other Tables
IN_TRAY Table
CL_SCHED Table
Appendix C. Summary of ISQL PF Keys
Using PF Keys in CMS FULLSCREEN Mode (DB2 Server for VM)
Appendix D. Summary of SQL Statements for Interactive Use
Appendix E. Suppressing the ISQL Sign-On Display for DB2 Server for VSE
Notices
Trademarks
Bibliography
Index
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]