Skip to content

MODIFIES

DECLARE
a INT := 10;
b INT := 20;
BEGIN
DBMS_OUTPUT.PUT_LINE ('The old value of a is: ' || to_char(a));
a := b;
DBMS_OUTPUT.PUT_LINE ('The new value of a is: ' || to_char(a));
END;
The old value of a is: 10
The new value of a is: 20

In the above example, the variable ‘a’ originally had the value of 10. The statement ‘a := b;’ modifies the value of ‘a’, assigning it the value of ‘b’ which is 20. This modification of the variable ‘a’ is reflected in the output.