I try to count how many records will be deleted after a DELETE
command:
SELECT COUNT(*) FROM BOXES
WHERE EXISTS (
DELETE FROM BOXES WHERE product='25043620' AND Order='0846'
)
I get an syntax error near delete, but I can't figure out which is it.
After some digging, I figured out... after
DELETE FROM BOXES WHERE product='25043620' AND Order='0846'
I ask database for changes with:
SELECT changes()
and I get how many rows was deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With