Options affecting SQL
Certain DB2® precompiler or coprocessor options (referred to as SQL processing options), DB2 subsystem parameters (set through the installation panels), bind options, options for CREATE PROCEDURE and ALTER PROCEDURE statements for native SQL procedures, and special registers affect how SQL statements can be composed or determine how SQL statements are processed.
The following table summarizes the effect of these options and shows where to find more information. (Some of the items are described in detail following the table, while other items are described elsewhere.)
SQL processing option | Other1 | Affects |
---|---|---|
DYNAMICRULES bind option or the native SQL procedures option | The rules that DB2 applies to dynamic SQL statements.
For details about authorization, see Authorization IDs and dynamic SQL.
The option can also affect decimal point representation, string delimiters,
and decimal arithmetic. For details about how DB2 applies the options to dynamic SQL statements when DYNAMICRULES bind, define, or invoke behavior is in effect, see SQL processing options for dynamic statements. |
|
USE FOR DYNAMICRULES | Use of options for dynamic statements when DYNAMICRULES bind, define, or, invoke behavior is in effect. For details, see SQL processing options for dynamic statements. | |
COMMA
PERIOD |
DECIMAL POINT IS | Representation of decimal
points in SQL statements. For details, see Decimal point representation. |
APOSTSQL
QUOTESQL |
SQL STRING DELIMITER | Representation of string
delimiters in SQL statements. For details, see Apostrophes and quotation marks as string delimiters. |
ASCII CCSID | A numeric value that determines the CCSID of ASCII
string data. For details, see Mixed data in character strings. |
|
EBCDIC CCSID | A numeric value that
determines the CCSID of EBCDIC string data and whether Katakana characters
can be used in ordinary identifiers. For details, see Katakana characters for EBCDIC. |
|
UNICODE CCSID | A numeric value that
determines the CCSID of Unicode string data. For details, see Mixed data in character strings. |
|
CCSID
|
MIXED DATA | Use of ASCII or EBCDIC
character strings with a mixture of SBCS and DBCS characters. For details, see Mixed data in character strings. |
DATE
TIME |
DATE FORMAT
TIME FORMAT LOCAL DATE LENGTH LOCAL TIME LENGTH |
Formatting of datetime
strings. For details, see Formatting of datetime strings. |
STDSQL | Conformance with the
SQL standard. For details, see SQL standard language. |
|
NOFOR or STDSQL | Whether the FOR UPDATE
clause must be specified (in the SELECT statement of the DECLARE CURSOR
statement). For details, see Positioned updates of columns. |
|
CONNECT | Whether the rules for
the CONNECT(1) or CONNECT(2) SQL processing option apply. For details about the SQL processing option, see DB2 Application Programming and SQL Guide. |
|
SQLRULES bind option | Whether a CONNECT statement is processed with DB2 rules or SQL standard rules. | |
CURRENT RULES special register | Whether the statements
ALTER TABLE, CREATE TABLE, GRANT, and REVOKE are processed with DB2 rules or SQL standard rules.
For details, see CURRENT RULES.
Whether DB2 automatically creates the LOB table space, auxiliary table, and index on the auxiliary table for a LOB column in a base table. For details, see Creating a table with LOB columns. Whether DB2 automatically creates an index on a ROWID column that is defined with GENERATED BY DEFAULT. For details, see the description of the clause for CREATE TABLE. Whether an external stored procedure runs as a main or subprogram. For details, see CREATE PROCEDURE (external). |
|
SQLRULES bind option or
CURRENT RULES special register |
Whether SQLCODE +236 is issued when the SQLDA provided on DESCRIBE or PREPARE INTO is too small and the result columns do not involve LOBs or distinct types. For details, see DESCRIBE and SQL descriptor area (SQLDA). | |
DEC | DECIMAL ARITHMETIC or
CURRENT PRECISION special register |
Whether DEC15 or DEC31
rules are used when both operands in a decimal operation have 15 digits
or less. For details, see Arithmetic with two decimal operands. |
Note: 1 The entries in this column are fields on
installation panels unless otherwise noted.
|