minus-squareNailbar@sopuli.xyztoProgramming@programming.dev•I accidentally removed the WHERE clause from my SQL query in a personal tool. Every row is now the same. I overwrote 206,000+ rows. I have no backup, I am stupid.linkfedilinkarrow-up16·1 year agoBy running a select query first, you get a nice list of the rows you are going to change. If the list is the entire set, you’ll likely notice. If it looks good, you run the update query using the same where clause. But that’s for manual changes. OP’s update statement looks like it might be generated from code, in which case this wouldn’t have helped. linkfedilink
minus-squareNailbar@sopuli.xyztoRisa@startrek.website•This must be what a stroke feels likelinkfedilinkEnglisharrow-up4·edit-21 year agoNo subtitles available for video. What were they saying? I only know a little German, and he refuses to help. linkfedilink
By running a select query first, you get a nice list of the rows you are going to change. If the list is the entire set, you’ll likely notice.
If it looks good, you run the update query using the same where clause.
But that’s for manual changes. OP’s update statement looks like it might be generated from code, in which case this wouldn’t have helped.