Specifies whether strings within double quotation marks are interpreted as string literals or delimited identifiers in the current connection.
1 – Environment
You can use the SET QUOTING 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;4mQUOTING[m[1m [1;4mRULES[m[1m qq> runtime-options qqqq> [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 – MIA
Specifies that SQL interprets strings within double quotation marks as delimited identifiers. Delimited identifiers are case sensitive. To comply with the ANSI/ISO standard naming conventions, you should use one of these options. In addition, you must use one of these options to use multischema database naming.
3.2 – parameter
Specifies the value of the runtime-options, which must be one of the following: o SQL99 o SQL92 o SQL89 o MIA o SQLV40
3.3 – parameter-marker
Specifies the value of the runtime-options, which must be one of the following: o SQL99 o SQL92 o SQL89 o MIA o SQLV40
3.4 – SQL89
Specifies that SQL interprets strings within double quotation marks as delimited identifiers. Delimited identifiers are case sensitive. To comply with the ANSI/ISO standard naming conventions, you should use one of these options. In addition, you must use one of these options to use multischema database naming.
3.5 – SQL92 or SQL99
Specifies that SQL interprets strings within double quotation marks as delimited identifiers. Delimited identifiers are case sensitive. To comply with the ANSI/ISO standard naming conventions, you should use one of these options. In addition, you must use one of these options to use multischema database naming.
3.6 – SQLV40
Specifies that SQL interprets strings within double quotation marks as string literals. The default is SQLV40.
3.7 – 'string-literal'
Specifies the value of the runtime-options, which must be one of the following: o SQL99 o SQL92 o SQL89 o MIA o SQLV40
4 – Examples
Example 1: Setting the quoting rules to SQL99 SQL> SET QUOTING RULES 'SQL99'; SQL> -- SQL> -- SQL interprets double quotation marks as delimited identifiers. SQL> -- SQL> CREATE TABLE "Employees_Table" cont> ("Employee_ID" CHAR(6), cont> "Employee_Name" CHAR (30)); SQL> -- SQL> -- SQL retains the upper- and lowercase letters within the identifier. SQL> -- SQL> SHOW TABLE EMPLOYEES_TABLE No tables found SQL> SHOW TABLE "Employees_Table" Information for table Employees_Table Columns for table Employees_Table: Column Name Data Type Domain ----------- --------- ------ Employee_ID CHAR(6) Employee_Name CHAR(30) . . . Example 2: Setting the quoting rules to SQLV40 SQL> SET QUOTING RULES 'SQLV40'; SQL> -- SQL> -- When you set the quoting rules to SQLV40, SQL interprets double SQL> -- quotation marks as string literals. SQL> -- SQL> CREATE TABLE "Employees_Table" %SQL-I-DEPR_FEATURE, Deprecated Feature: " used instead of ' for string literal CREATE TABLE "Employees_Table" ^ %SQL-W-LOOK_FOR_STT, Syntax error, looking for: %SQL-W-LOOK_FOR_CON, name, FROM, %SQL-F-LOOK_FOR_FIN, found Employees_Table instead SQL> -- SQL> -- Although you can use double quotation marks for string literals, SQL SQL> -- returns a deprecated feature message. SQL> -- SQL> INSERT INTO EMPLOYEES cont> (EMPLOYEE_ID, LAST_NAME, STATUS_CODE) cont> VALUES cont> ("00500", 'Toliver', '1'); %SQL-I-DEPR_FEATURE, Deprecated Feature: " used instead of ' for string literal 1 row inserted SQL> --