Hacker News new | ask | show | jobs
by SoftTalker 880 days ago
I'll usually write it as a SELECT, to be sure my WHERE is correct, then I'll convert it to an UPDATE.

And if you screw up, well that's what ROLLBACK is for.

1 comments

If you have to use TSQL like me, you can use BEGIN/ROLLBACK TRAN with an OUTPUT clause to easily confirm, then just change it to COMMIT. I actually like this workflow quite a lot