SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

Metadata Tables
HP NonStop SQL/MX Reference Manual544517-008
10-52
Object Naming
The three-part logical name of the form catalog.schema.object is an ANSI name.
The parts catalog and schema denote the ANSI-defined catalog and schema.
To be compliant with ANSI SQL:1999, NonStop SQL/MX provides support for ANSI
three-part object names. By using these names, you can develop ANSI applications
that access all SQL/MP objects. You must create an alias for SQL/MP objects. See
CREATE SQLMP ALIAS Statement on page 2-73 and ALTER SQLMP ALIAS
Statement on page 2-8 for more information.
NAMETYPE Attribute
The NAMETYPE attribute determines the precedence rules for object naming
according to whether the value of the attribute is ANSI or NSK. The value of the
NAMETYPE attribute is determined according to rules applied in this order:
1. The SET NAMETYPE statement and CONTROL QUERY DEFAULT statement
have the same precedence:
If you issue a SET NAMETYPE statement, the compiler uses the setting
determined by this statement as the value of the attribute.
Use the SET NAMETYPE statement in MXCI. For embedded SQL, the SET
NAMETYPE statement affects only dynamic embedded SQL. The DECLARE
NAMETYPE statement affects only static embedded SQL.
For SQL statements issued through MXCI and embedded SQL, the compiler
uses the NAMETYPE value set by the CONTROL QUERY DEFAULT
statement (if issued).
2. For SQL statements issued through MXCI and embedded SQL, the compiler uses
the SYSTEM_DEFAULTS table entry (if it exists).
3. For SQL statements issued through MXCI and embedded SQL, if these values are
not set, the system-defined default setting for the NAMETYPE attribute is ANSI.
Attribute Value ANSI for Logical Names
If the NAMETYPE attribute is ANSI or is not specified, object names are determined
according to rules applied in this order:
1. If you specify a fully qualified three-part logical name explicitly in your SQL
statement, the SQL/MX compiler compiles the statement by using the three parts
of this name.
2. The SET CATALOG statement, SET SCHEMA statement, and CONTROL QUERY
DEFAULT statement have the same precedence:
MP_VOLUME Default physical volume, used if no volume is specified in the
NSK name. If not set, the default volume is specified by the
=_DEFAULTS define.
Attribute Setting