'Is it possible to return how many records has been inserted and updated after an upsert statement?

I have a MERGE INTO statement in DB2 and somehow I need to return how many records has been updated and how many records has been inserted. Is it possible?

db2


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source