How to check the number of rows affected in DB2 INSERT / DELETE / UPDATE / MERGE commands

By default,Db2 doesn’t print the number of records affected when we run the DML commands like INSERT,UPDATE,DELETE & Merge in the command prompt.

 For Displaying the count we have 2 methods

 

1.use -m

 

Eg: db2 -m “insert or update or delete statement

 2. Add the following Profile Registry Command

 Db2set db2options=-m

 Restart the Instance

 Db2stop

 Db2start

 

Then try to insert or update the records in a table.you can find the counts after the statement executed successfully.

 

 

Comments

Popular posts from this blog

Db2 export command example using file format (del , ixf)

How to fix DB2 Tablespace OFFLINE state issue?

Phases of a load operation