NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-74
CONTROL TABLE Directive
AS cor
specifies that the control options apply only to instances of the table or view with
the correlation name cor. The correlation name can be either implicit or explicit.
view
is the name of a view to which the control options apply (or an equivalent DEFINE),
exactly as the view name (or DEFINE name) appears in subsequent references that
are to be affected by the control options.
For example, if view is a fully qualified Guardian name, then the control options
apply to subsequent references that use the same fully qualified Guardian name. The
control options do not apply to references that use only the view name (even if the
name expands to the same fully qualified name) nor to references that use a
DEFINE name (even if the view associated with the DEFINE is the same view).
Similarly, if view is a DEFINE name, then the control options apply to subsequent
references that use the same DEFINE name. The control options do not apply to
references that specify a view name, even if the DEFINE value is the view name.
To apply a CONTROL TABLE statement to one or more tables within a view, you
must use either an explicit or implicit correlation name for the table. SQL returns a
syntax error if you specify any other type of name.
BASETABLE btcor
specifies that the control options for view apply only to the table or tables inside
the view that have the correlation name btcor. The correlation name may be either
implicit or explicit.
*
specifies that the control options apply to all tables referenced in the host language
program or SQLCI session. (For specific rules about the scope of the CONTROL
TABLE directive in a host program, see the NonStop SQL/MP programming
manual for the host language used in the program.)
ACCESS PATH { SYSTEM | PRIMARY | INDEX index }
[ MDAM ON [ USE {value|DEFAULT} [KEY] COLUMN[S] ]
[ ACCESS { SPARED | DENSE| SYSTEM} ] ]
controls the access path for a DELETE, SELECT, or UPDATE, or for the SELECT
portion of an INSERT-SELECT.
The default is ACCESS PATH SYSTEM.
SYSTEM directs SQL to choose the access path
PRIMARY specifies the primary access path for the table
INDEX specifies index as the access path