This example shows how to multiply the values of two source columns and replicate the result to a new target column.
The following figure shows how the source table columns and virtual column map to the target table columns:
Use the following compute_total SQL expression:
:NEW.ITEM_PRICE*:NEW.QUANTITY
In this example, the compute_total SQL expression is assigned to the TOTAL_PRICE virtual column in the source table. The expression multiplies the REDO values of the ITEM_PRICE and QUANTITY columns. The result is replicated to the TOTAL_PRICE column in the target database.