NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-39
Column Identifier
NonStop SQL/MP supports collations for single-byte character sets, but not for double-
byte character sets. (Double-byte character values always collate in binary order and
cannot be upshifted.)
When you create or index a column that has a character data type and a single-byte
character set, you can specify the name of a collation to associate with the column. The
collation defines the default sort order for values in the column within the table or index.
When you create a column that is part of the primary key for the table and associate a
collation with that column, the collation also affects the storage order for rows in the
table.
You can also specify a collation as part of a character expression that uses single-byte
character strings (for example, an expression that compares two character strings from
the ISO88591 character set), modifying the ordering and equivalence relationships that
determine the result of the expression. (See Character Expressions
on page C-11 for
more information.)
A collation name must be a Guardian name.
You create a collation with the CREATE COLLATION statement.
You associate an existing collation with a column or index when you specify the data
type for the column or index at the time you create it with the CREATE TABLE,
ALTER TABLE, or CREATE INDEX statement. See Data Types
on page D-1 for a
description of the clause that specifies the data type on these statements.
NonStop SQL/MP includes a set of Guardian procedures that you can invoke from host
language programs to compare collations or return information about a collation. See the
NonStop SQL/MP Programming Manual for COBOL85 or the NonStop SQL/MP
Programming Manual for C for more information about these procedures.
Column Identifier
A column identifier is used in some SQLCI report writer statements to specify a column
in the result of a SELECT command or a named column in the detail list.
column-name
is the name of a column specified in the select list. You must qualify an unqualified
name if it is the same as any other unqualified name in the select list. For example,
if the select list includes EMPLOYEE.DEPTNUM and DEPT.DEPTNUM, you must
qualify these names when specifying a column identifier. If only
EMPLOYEE.DEPTNUM is in the select list, you can omit the qualifier.
{ column-name }
{ COL number }
{ alias }
{ detail-alias }