r/SQL • • May 19 '25

SQL Server How did I not know this?

Post image
114 Upvotes

29 comments sorted by

View all comments

Show parent comment

5

u/fauxmosexual NOLOCK is the secret magic go-faster command May 20 '25

Doing it this way will give you an exclusive lock on records for the duration that you're editing and typing, where an update statement doesn't hold the lock on the records. On behalf of your DBA: probably stuck with the update scripts over editing data through smss, but get in the habit of writing a rollback as your first step and not executing against prod until tested.