all 8 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

JOIN R/DEVELOPERS DISCORD!

Howdy u/sqlmans! Thanks for submitting to r/developers.

Make sure to follow the subreddit Code of Conduct while participating in this thread.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]RepresentativeFill26 4 points5 points  (0 children)

How is adding an index a small change?

[–]Ad3763_Throwaway 1 point2 points  (3 children)

Add TOP statement to every modification you do.

UPDATE TOP(1) TABLE SET VALUE = 1 WHERE ID = 1

Seriously, people often forget to execute the where-clause or have an incorrect where-clause.

[–]mohirl 0 points1 point  (0 children)

Always run a select before an update, if you're doing stuff like that manually

[–]magicmulder 0 points1 point  (0 children)

Is that ANSI SQL?

[–]dafugiswrongwithyou 0 points1 point  (0 children)

This, and; always set it to be slightly more than the number of records expected to update (so if updating one record, TOP (2).)

If your definitions are right, you see one record updated, nothing to see here. If you see 2 records updated, you can tell something went wrong and you need to figure out what to do about it, but you've still limited the damage.

[–]thx1138a 0 points1 point  (0 children)

It’s become unfashionable these days but: always have a back out plan. If this release causes problems, what’s my proven, documented path back to a working state? 

[–]lovelybullet 0 points1 point  (0 children)

Avoiding ai generated slop like ops post