ALLBASE/SQL Reference Manual (36216-90216)

508 Chapter12
SQL Statements S - Z
SELECT
computed by evaluating the specified expression for each row of the result
table.
The expression can be of any complexity. For example, it can simply
designate a single column of one of the tables or views specified in the
FROM clause, or it can involve aggregate functions, multiple columns, and
so on. When you specify one or more aggregate functions in a select list,
the only other entity you can specify is the name(s) of the column(s) you
group by.
[ [
Owner
.]
Table
.]
ColumnName
includes a particular column from the named owner's
indicated table.
CorrelationName. ColumnName
includes a specific column from the table whose
correlation name is defined in the FROM clause.
SQL Syntax — BULK HostVariableSpecification
:
Buffer
[,:
StartIndex
[,:
NumberOfRows
] ]
Parameters — BULK HostVariableSpecification
Buffer
is a host array or structure that is to receive the output of the SELECT
statement. This array contains elements for each column in the
SelectList
and indicator variables for columns that can contain null
values. Whenever a column can contain nulls, an indicator variable must
be included in the array definition immediately after the definition of that
column. The indicator variable can receive the following integer values
after a SELECT statement:
0 the column's value is not NULL
1 the column's value is NULL
> 0 is truncated; the number indicates the data length before
truncation
StartIndex
is a host variable whose value specifies the array subscript denoting where
the first row in the query result should be stored; default is the first
element of the array.
Number- OfRows
is a host variable whose value specifies the maximum number of rows
to store; default is to fill from the starting index to the end of the array.
The total number of rows stored is returned in the SQLERRD[3] field of the SQLCA.
(SQLERRD[2] for the C language.)
SQL Syntax — non-BULK HostVariableSpecification
{ :
HostVariable
[INDICATOR]:
Indicator
] } [,...]
Parameters — non-BULK HostVariableSpecification
HostVariable
identifies the host variable corresponding to one column in the row.