Reply to post: Re: it's so easy

Oh, sugar! Sysadmin accidently deletes production database while fixing a fault

werdsmith Silver badge

Re: it's so easy

BEGIN TRAN

START TRAN

SET TRAN

IMPLICIT TRAN

(choose as appropriate)

Then DELETE FROM WHATEVER WHERE THING = OTHERTHING

If oh shit 1234434554453 rows deleted (I was expecting 1)

then ROLLBACK

otherwise if you are happy

COMMIT

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019