SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
S-22
SELECT Statement
The IN clause is not allowed for BROWSE ACCESS. In SHARE MODE it is
ignored for cursor SELECT operations.
If you omit the IN clause, SQL uses SHARE until an attempt is made to modify the
data, escalates the lock to EXCLUSIVE.
For more information, see Locking on page L-48.
GROUP BY { colname | colnum }
specifies columns of the result table from the preceding FROM or WHERE clause
that define a set of groups in which each group consists of rows with identical
values in the specified columns.
For example, if you specify AGE, the result table contains one group of rows with
AGE equal to 40 and one group with AGE equal to 50. If you specify AGE and
JOB, the result table contains one group for each different age and job code pair.
When you refer to a grouping column in a search condition or expression, you refer
to a single value because each row in the group contains the same value in the
grouping column.
For grouping, all null values are considered equal to one another. The result table
of a GROUP BY clause can have only one null group.
If the FROM clause specifies a grouped view, you cannot specify a GROUP BY
clause.
colname
is the name of a single column from a table in the FROM clause, optionally
qualified by a table name, view name, or correlation name: for example,
CUSTOMER.CITY.
colnum
is a positive integer that specifies a column by its position in the select-list.
Use colnum to refer to unnamed columns, such as expressions.
In a GROUP BY clause, you cannot use colnum to specify a column that is an
expression that contains a function if the argument of the function is a column of
the FROM clause result table. You can use colnum if the argument is a correlated
reference to a column from an outer query.