Question Locked

There is a delete sql on a DB2 table. Because of delete cascade, rows are g

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
There is a delete sql on a DB2 table. Because of delete cascade, rows are getting deleted from two tables in a single SQL. How can I get the number of rows deleted from child table? Is there any way out?

2 replies

by tony hopkinson

is to do a select count query on the dependent table.
If I had to do it, and I'd need a good reason to even bother, would probably wrap the entire think up in a stored proc.

The whole point of cascade is to be transparent, wanting to know this almost defeats having it in the first place.

This discussion is closed to new replies.