问题
is it possible to find out the amount of rows that will be deleted in each table when one row is deleted in a table?
For example, I have a row in a product table. I deleted a product and since i have use on delete cascade, the other rows in different tables such as Comments and Price will be deleted. Is it possible to get the amount of rows that will be deleted from the other tables as a string?
The sample output will be "3 rows of comment will be deleted\n 1 rows of price will be deleted" Thanks in advance!
回答1:
Check Out This Answer, This may help you to Solve your Problem.
Oracle Delete Statement: how many rows have been deleted by cascade delete
来源:https://stackoverflow.com/questions/56542158/find-out-how-many-rows-that-will-be-deletedon-cascade-if-one-row-in-a-table-is