SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual—523725-004
6-108
SQL/MP Aliases
SQL/MP Aliases
In product versions prior to SQL/MX Release 2.x, you referenced SQL/MP database
objects using their Guardian physical names. In SQL/MX Release 2.x you can create
SQL/MP aliases that map logical object names to physical Guardian locations.
SQL/MP aliases are simulated ANSI names that represent the underlying Guardian
physical names of SQL/MP objects. True ANSI names do not exist for SQL/MP
objects.
You can use the CREATE SQLMP ALIAS command within your application to create
the mappings from logical to physical names. When NonStop SQL/MX executes this
command, it inserts a mapping as a row in the OBJECTS table.
See CREATE SQLMP ALIAS Statement on page 2-71, ALTER SQLMP ALIAS
Statement on page 2-9, and DROP SQLMP ALIAS Statement on page 2-128 for
descriptions of the statements that affect SQL/MP Aliases. See OBJECTS Table on
page 10-18 for a description of the table. See Database Object Names on page 6-12
for a description of Object Names and their relationship with the OBJECTS Table.
Stored Procedures
A stored procedure is a type of user-defined routine (UDR) that operates within a
database server. Stored procedures are registered in NonStop SQL/MX during the
execution of a CREATE PROCEDURE statement and invoked by NonStop SQL/MX
during the execution of a CALL statement. For more information, see CREATE
PROCEDURE Statement on page 2-61 and CALL Statement on page 2-29.
Unlike a user-defined function, a stored procedure does not return a value directly to
the caller. Instead, a stored procedure returns a value to a host variable or dynamic
parameter in its parameter list.
NonStop SQL/MX supports only stored procedures that are written in the Java
language. For more information, see the SQL/MX Guide to Stored Procedures in Java.
Subquery
A subquery is a query expression enclosed in parentheses. Its syntactic form is
specified in the syntax of a SELECT statement. For further information about query
expressions, see SELECT Statement on page 2-178.
A subquery is used to provide values for a BETWEEN, comparison, EXISTS, IN, or
quantified comparison predicate in a search condition. It is also used to specify a
derived table in the FROM clause of a SELECT statement.
A subquery can be a table, row, or scalar subquery. Therefore, its result table can be a
table consisting of multiple rows and columns, a single row of column values, or a
single row consisting of only one column value.