Library /sys$common/syshlp/SQL$HELP_OLD72.HLB  —  SET_KEYWORD_RULES
    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

  SET KEYWORD RULES -----> runtime-options ------>

  runtime-options

  --+---> 'string-literal' ------+----->
    +---> parameter -------------+
    +---> parameter-marker ------+

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> --
Close Help