fiveoar@lemmy.dbzer0.comtoProgramming@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.
10·
1 year agoI have done this too. Shit happens.
One of my co-workers used to write UPDATE
statements backwards limit then where etc, to prevent this stuff, feels like a bit of a faff to me.
Another option is like in German where you invent some sort of new suffix like “*in”. For example, Lehrer (m), Lerhrerin (w), Lehrer*in (m/w/d). Prounounced as a sort of shorter than space silence.