Oracle® Database SQL Quick Reference 10g Release 2 (10.2) Part Number B14195-02 |
|
|
View PDF |
This chapter presents the syntax for combining values, operators, and functions into expressions.
This chapter includes the following section:
An expression is a combination of one or more values, operators, and SQL functions that evaluate to a value. An expression generally assumes the datatype of its components.
Expressions have several forms. The sections that follow show the syntax for each form of expression. Refer to Chapter 5, "Subclauses" for the syntax of the subclauses.
See Also: Expressions in Oracle Database SQL Reference for detailed information about SQL expressions |
CASE { simple_case_expression | searched_case_expression } [ else_clause ] END
{ (expr) | { + | - | PRIOR } expr | expr { * | / | + | - | || } expr } Note: The double vertical bars are part of the syntax (indicating concatenation) rather than BNF notation.
CURSOR (subquery)
datetime_value_expr AT { LOCAL | TIME ZONE { ' [ + | - ] hh:mm' | DBTIMEZONE | 'time_zone_name' | expr } }
any built-in SQL function or user-defined function can be used as an expression
interval_value_expr { DAY [ (leading_field_precision) ] TO SECOND [ (fractional_second_precision) ] | YEAR [ (leading_field_precision) ] TO MONTH }
{ measure_column [ { condition | expr }[ , { condition | expr } ...] ] | aggregate_function { [ { condition | expr }[ , { condition | expr } ...] ] | [ single_column_for_loop [, single_column_for_loop] ... ] | [ multi_column_for_loop ] } | analytic_function }
Note: The outside square brackets shown in boldface type are part of the syntax. In this case, they do not represent optionality. |
{ table_alias.column. | object_table_alias. | (expr). } { attribute [.attribute ]... [.method ([ argument [, argument ]... ]) ] | method ([ argument [, argument ]... ]) }
a subquery that returns exactly one column value from one row can be used as an expression
{ [ query_name. | [schema.] { table. | view. | materialized view. } ] { column | ROWID } | ROWNUM | string | number | sequence. { CURRVAL | NEXTVAL } | NULL }
[ NEW ] [ schema. ]type_name ([ expr [, expr ]... ])
:host_variable [ [ INDICATOR ] :indicator_variable ]