5 ms·
This terrifies me as well. The workaround is to write the WHERE clause before the SET clause. If you inadvertently submit the query partway, it will be invalid
by Fradow 3y ago
This terrifies me as well. The workaround is to write the WHERE clause before the SET clause. If you inadvertently submit the query partway, it will be invalid and it's not a big deal.
- SoftTalker 3y agoI'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.
- noSyncCloud 3y agoIf 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
- deleted 3y ago[deleted]
- foreigner 3y agoI do this too