NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
M-4
Considerations—MIN
DISTINCT column
specifies a set of distinct column values from each row of the result table to
determine a minimum value. The column cannot be a column from a view that
corresponds to an expression in the view definition.
If you specify DISTINCT in more than one MIN function in the same statement, the
functions must reference the same column.
Duplicate rows are eliminated only if you specify DISTINCT; otherwise, all rows
are included, whether or not you specify ALL.
Specifying DISTINCT with the MIN function places no restrictions on the use of
DISTINCT with AVG, SUM, MAX, or COUNT.
Considerations—MIN
Collations for character arguments
If you specify an expression or column with a character data type as the argument to
MIN, the collation used for the comparison is the collation associated with the
argument. SQL uses a binary comparison if no collation is associated with the
argument.
Null values
MIN is evaluated after eliminating all null values from the aggregate set. If the
result set is empty, MIN returns a null value.
Indicator required for host variables
A host variable that receives the result of the MIN function must have an indicator
variable to handle a possible null value. (For more information about using indicator
variables, see the NonStop SQL/MP programming manual for your host language.)
Examples—MIN
To determine the minimum value in the SALARY column, type:
>>SELECT MIN (SALARY) FROM PERSNL.EMPLOYEE;
(EXPR)
-----------
12000.00
--- 1 row(s) selected.
MODIFY CATALOG Command
The MODIFY CATALOG command modifies node names in NonStop SQL/MP
catalogs on the local node. A catalog can be a user-defined catalog or the system
catalog.
This command is intended for use when physically moving a disk from one node in your
network to another node, or when coldloading a node with a new node name or number.
When this happens, changes are not automatically reflected in the catalogs and file