This introductory chapter:
Note: | For ease of reading, this book follows the following convention: |
This book is for programmers, system administrators, and database administrators who want to use SQL to access a DB2 Server for VSE & VM database. This book is a reference rather than a tutorial or guide. It assumes you are already familiar with SQL. This book also assumes that you will be writing applications for the VM or VSE environment and therefore presents the full functions of the DB2 Server for VSE & VM program.
It is assumed that you possess an understanding of system administration, database administration, or application programming in the DB2 Server for VM or DB2 Server for VSE environment, as provided by the appropriate guide, and you have some knowledge of the following:
It also assumes that you are familiar with the information found in the DB2 Server for VSE & VM Overview manual.
This book has the following sections:
|Your feedback is important in helping to provide the most accurate and |high-quality information. If you have any comments about this book or |any other DB2 Server for VSE & VM documentation: |
|http://www-4.ibm.com/software/data/db2/vse-vm/
Format | Address | |
---|---|---|
Internet | torrcf@ca.ibm.com | |
Facsimile | (416) 448-6161 (Attention RCF Coordinator) |
|Be sure to include the name of the book, the form number (including the |suffix), and the page, section title, or topic you are commenting on.
|If you choose to respond through the Internet, please include either your |entire Internet network address, or a postal address.
Throughout this manual, syntax is described using the structure defined below.
The >>--- symbol indicates the beginning of a statement or command.
The ---> symbol indicates that the statement syntax is continued on the next line.
The >--- symbol indicates that a statement is continued from the previous line.
The --->< symbol indicates the end of a statement.
Diagrams of syntactical units that are not complete statements start with the >--- symbol and end with the ---> symbol.
>>-SAVE-------------------------------------------------------->< |
Others must be followed by one or more keywords or variables. For example:
>>-SET AUTOCOMMIT OFF------------------------------------------>< |
>>-DROP SYNONYM--synonym--------------------------------------->< |
>>-SHOW DBSPACE--integer--------------------------------------->< |
This command might appear as:
SHOW DBSPACE 1
>>-CREATE----+---------+--INDEX-------------------------------->< '-UNIQUE--' |
This statement could appear as either:
CREATE INDEX
or
CREATE UNIQUE INDEX
If you must choose one of the items, one item appears on the main path. For example:
>>-SHOW LOCK DBSPACE----+-ALL-----+---------------------------->< '-integer-' |
Here, the command could be either:
SHOW LOCK DBSPACE ALL
or
SHOW LOCK DBSPACE 1
If choosing one of the items is optional, the entire stack appears below the main path. For example:
>>-BACKWARD----+---------+------------------------------------->< +-integer-+ '-MAX-----' |
Here, the command could be:
BACKWARD
or
BACKWARD 2
or
BACKWARD MAX
.---------. V | >>-ERASE-------name---+---------------------------------------->< |
This statement could appear as:
ERASE NAME1
or
ERASE NAME1 NAME2
A repeat symbol above a stack indicates that you can make more than one choice from the stacked items, or repeat a choice. For example:
.-,-----------------------. V | >>-VALUES--(------+-constant-----------+--+--)----------------->< +-host_variable_list-+ +-NULL---------------+ '-special_register---' |
.-ASC--. >>-+------+---------------------------------------------------->< '-DESC-' |
In the following example, if you enter the optional keyword PCTFREE =, you also have to specify one of its associated optional parameters. If you do not enter PCTFREE =, the database manager will set it to the default value of 10.
.-PCTFREE = 10------. >>-+-------------------+--------------------------------------->< '-PCTFREE = integer-' |
.-PRIVILEGES--. >>-REVOKE ALL----+-------------+------------------------------->< |
>>-+----------------------------+---| fieldproc_block |-------->< '-NOT NULL--+-------------+--' +-UNIQUE------+ '-PRIMARY KEY-' |
fieldproc_block |--FIELDPROC--program_name----+-------------------------+-------| | .-,-----------. | | V | | '-(-----constant---+---)--' |
The following words are reserved in the SQL language. They cannot be used in SQL statements except for their defined meaning in the SQL syntax or as host variables, preceded by a colon.
In particular, they cannot be used as names for tables, indexes, columns, views, or dbspaces unless they are enclosed in double quotation marks (").
ACQUIRE ADD ALL ALTER AND ANY AS ASC AVG BETWEEN BY CALL CHAR CHARACTER COLUMN COMMENT COMMIT CONCAT CONNECT COUNT CREATE CURRENT DBA DBSPACE DELETE DESC DISTINCT DOUBLE DROP EXCLUSIVE EXECUTE EXISTS EXPLAIN FIELDPROC FOR FROM |
GRANT GRAPHIC GROUP HAVING IDENTIFIED IN INDEX INSERT INTO IS LIKE LOCK LONG MAX MIN MODE NAMED NHEADER NOT NULL OF ON OPTION OR ORDER PACKAGE PAGE PAGES PCTFREE PCTINDEX PRIVATE PRIVILEGES PROGRAM PUBLIC |
RESOURCE REVOKE ROLLBACK ROW RUN SCHEDULE SELECT SET SHARE SOME STATISTICS STORPOOL SUM SYNONYM TABLE TO UNION UNIQUE UPDATE USER VALUES VIEW WHERE WITH WORK |
When mixed data values are shown in examples the following conventions apply:
Some words have been shortened in some of the syntax diagrams in this book. The words are: