Specifies whether or not you can use identifiers as keywords in the current attach.
1 – Environment
You can use the SET KEYWORD RULES statement: o In interactive SQL o Embedded in host language programs to be precompiled o As part of a procedure in an SQL module o In dynamic SQL as a statement to be dynamically executed
2 – Format
(B)0[m[1;4mSET[m[1m [1;4mKEYWORD[m[1m [1;4mRULES[m[1m qqqqq> runtime-options qqqqqq> [m [1m [m (B)0[m[1mruntime-options [m [1m [m [1mqqwqqq> 'string-literal' qqqqqqwqqqqq> [m [1m tqqq> parameter qqqqqqqqqqqqqu [m [1m mqqq> parameter-marker qqqqqqj [m
3 – Arguments
3.1 – parameter
Specifies the value of runtime-options, which must be one of the following: o SQL99 o SQL92 o SQL89 o MIA o SQLV40
3.2 – parameter-marker
Specifies the value of runtime-options, which must be one of the following: o SQL99 o SQL92 o SQL89 o MIA o SQLV40
3.3 – MIA
Specifies that SQL returns an error if statements use keywords (reserved words) as identifiers, unless the keywords are enclosed in double quotation marks.
3.4 – 'string-literal'
Specifies the value of runtime-options, which must be one of the following: o SQL99 o SQL92 o SQL89 o MIA o SQLV40
3.5 – SQL89
Specifies that SQL returns an error if statements use keywords (reserved words) as identifiers, unless the keywords are enclosed in double quotation marks.
3.6 – SQL92
Specifies that SQL returns an error if statements use keywords (reserved words) as identifiers, unless the keywords are enclosed within double quotation marks.
3.7 – SQL99
Specifies that SQL returns an error if statements use keywords (reserved words) as identifiers, unless the keywords are enclosed within double quotation marks.
3.8 – SQLV40
Specifies that SQL returns an error if statements use keywords (reserved words) as identifiers, unless the keywords are enclosed within double quotation marks.
4 – Examples
Example 1: Setting the keyword rule characteristics to SQL99 SQL> SET KEYWORD RULES 'SQL99'; SQL> -- SQL> -- Because NATIONAL is a keyword, SQL returns an error message. SQL> -- SQL> CREATE DOMAIN NATIONAL CHAR (2); %SQL-F-RES_WORD_AS_IDE, Keyword NATIONAL used as an identifier SQL> -- SQL> -- Enclose NATIONAL in double quotation marks. SQL> -- SQL> CREATE DOMAIN "NATIONAL" CHAR (2); SQL> -- Example 2: Setting the keyword rule characteristics to SQLV40 SQL> SET KEYWORD RULES 'SQLV40'; SQL> -- SQL> -- You can use a keyword as an identifier. SQL> -- SQL> CREATE DOMAIN NATIONAL CHAR (2); %SQL-I-DEPR_FEATURE, Deprecated Feature: Keyword national used as an identifier SQL> --