Db2 Tools for z/OS

 View Only

Db2 Administration Tool: Viewing the number of rows impacted by an UPDATE, DELETE, or INSERT statement by Kate Wheat

By CALENE JANACEK posted Thu October 22, 2020 11:40 AM

  

Did you know that when you execute UPDATE, DELETE or INSERT statements in Db2 Administration Tool, you can display the number of rows that were affected?

After you execute one of these SQL statements, a message confirms that the statement was executed. While this confirmation message is displayed, you can press PF1 to also display informational message ADB260I, which reports the number of rows affected.

Example:

  1. Use option 2.1 or 2.2 to execute UPDATE, INSERT, or DELETE statements, such as:

INSERT INTO TS5772.DISCOUNT

 VALUES

 (1,'AB' 2,'A','B','C','D','E','F','2019-11-25','G',3,4,'H','I',5);

After the statement is executed, a confirmation message is displayed:

ADB22 min -------------------- Execute SQL Statements ------------------- 16:30

Option ===>                                                                   

INSERT stmt executed                                                           

   1 - Edit/run SQL statements                           DB2 System: DC1A     

   2 - Run or Explain SQL statements                     DB2 SQL ID: TS5772   

   3 - Build SQL SELECT, INSERT, UPDATE or DELETE prototype                    

   4 - Create/drop/label/comment on objects                                   

   5 - Grant/revoke privileges on objects                                     

  1. Press PF1 to see the number of affected rows displayed at the bottom of the screen:

ADB260I 1 row(s) affected by the INSERT statement

 #db2tools,

​​
#Db2Toolsforz/OS
#db2admin
0 comments
3 views

Permalink