If you looking for “How to get the number of rows about to get deleted.Please try small tricks to avoid unwanted data deletion.
You can use SELECT to get the number of rows about to get deleted.
By this query we check the number of the deleted row before running the delete query to avoid the unwanted records deletion.
For example yours delete query is:
Table Name :employee
Delete Query :
“DELETE FROM employee WHERE employee_country=’India'”
Now you can check total deleted data before query will run.Just replace the “SELECT * ” in place of “DELETE”.
“SELECT * FROM employee WHERE employee_country=’India'”