Numeric expressions

Use a numeric expression to specify a value in the source column whenever the data types for the corresponding source and destination columns are compatible.

An numeric expression consists of the following syntax:

operand1 operator operand2

Each operand must be a numeric column or a numeric constant. The operator specifies whether to add ( + ), subtract ( - ), divide ( / ), or multiply ( * ).

Example 1

To increase the value in a column UNIT_PRICE defined as DECIMAL(5,2) by 10 percent, specify the following example:

1.1 * UNIT_PRICE

Example 2

To divide the value in an INTEGER column ON_HAND_INVENTORY in half, specify the following example:

ON_HAND_INVENTORY / 2.



Feedback