2.3. EXPRESSIONS IN AN SQL STATEMENT
An expression is a combination of operands and operators, which evaluates to a scalar:
Scalar: a single data value such as number 13, date '1 Jan 2003' or string 'Jim Doe'
Operand: a constant (literal), column name, variable, scalar function subquery whose result set is a scalar value
Operator: any legal operator symbol allowed by the data type of the operand(s)
An expression generally assumes the data type of its component operands except that operands combined using comparison or logical operators result in a value of Boolean data type.
String, numeric and date expressions may usually be used anywhere a scalar value of their data type is required in INSERT, UPDATE, DELETE and SELECT statements. (See the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access