How can you quickly find out the # of rows updated after an update statement?



How can you quickly find out the # of rows updated after an update statement?..

Answer / Pal Singh

To get the number of rows affected by an UPDATE or DELETE statement in DB2, use the ROWCOUNT command before and after the operation. Example: nBEFORE UPDATE ...; SELECT @ROWCOUNT AS 'Number of rows updated';nAFTER UPDATE ...

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is ACQUIRE/RELEASE in BIND?

3 Answers   Cognizant,


What is the latest version of ibm db2?

0 Answers  


What is the maximum number of tables that can be stored on a Partitioned Table Space ?

1 Answers   IBM,


How many Buffer pools are there in DB2 and what are they?

1 Answers   IBM,


Is it possible to update a primary key value? If not, what is the error code given? If yes, can more than 1 primary key column be updated at a time?

8 Answers  


Which component is used to execute the sql statements?

1 Answers  


What do you mean by NOT NULL WITH DEFAULT? When will you use it?

3 Answers  


What is the connection string to connect to the DB2 Database ?

1 Answers   MCN Solutions,


What is filter factor?

2 Answers  


What is a Resource Control Table(RCT)? Describe its characteristics.

3 Answers  


What is the difference between static and dynamic SQL?

1 Answers  


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

1 Answers  


Categories