SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-78
CONTROL TABLE Directive
control options do not apply to references that use only the table name (even if the
name expands to the same fully qualified name) nor to references that use a
DEFINE name (even if the table associated with the DEFINE is the same table).
Similarly, if table is a DEFINE name, the control options apply to subsequent
references that use the same DEFINE name. The control options do not apply to
references that specify a table name, even if the DEFINE value is the table name.
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, 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, 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 can 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 SQL/MP programming manual for the
host language used in the program.)