Ch 8. Expressions [ ALLBASE/SQL Reference Manual ] MPE/iX 5.5 Documentation
ALLBASE/SQL Reference Manual
Chapter 8 Expressions
This chapter discusses value specification. The following sections are
presented:
* Expression
* Add Months Function
* Aggregate Functions[REV BEG]
* CAST Function
* Constant
* Current Functions
* Date/Time Functions[REV END]
* Long Column Functions
* String Functions
* TID Function
An expression specifies a value to be obtained in one of the following
ways:
* From a column of a table
* From a host variable in an application program
* From a dynamic parameter
* From a local variable or parameter in a procedure
* From a constant
* By adding, subtracting, multiplying, dividing, or negating values
* By evaluating an aggregate function
* By evaluating a date/time (conversion, current, or add months)
function
* By evaluating a long column or string function
* By a combination of these methods
Expressions are used for several purposes including:
* To identify columns. In the SELECT statement, expressions are
used in the select list to identify column values to be retrieved.
The SELECT statement is also part of the CREATE VIEW, DECLARE
CURSOR, and INSERT statements. The expressions in this case
identify columns that qualify for the view, the cursor, or the
insert operation.[REV BEG]
* To identify rows. In the search condition of the following
statements, expressions help define the set of rows to be operated
on: SELECT, INSERT, UPDATE, DELETE, CREATE VIEW, and DECLARE.
Refer to the "Search Conditions" chapter for more information.
* To define a new column value. In the UPDATE statement,
expressions define a new value for a column in an existing
row.[REV END]
MPE/iX 5.5 Documentation