Oracle AI Database 26ai enhanced the RETURNING clause for DML
You can get the before & after values with OLD & NEW
Added support for MERGE
So you can do
UPDATE ...
RETURN OLD col, NEW col
INTO :before, :after
MERGE INTO ...
RETURN OLD col, NEW col
INTO :before, :after
28 days ago