Find out how many rows that will be deleted(on cascade) if one row in a table is deleted

左心房为你撑大大i 提交于 2021-01-29 07:38:03

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!