The worst typo in MySQL query ever

Well, today I’ve learned something new.  Typing a query like this:

UPDATE `table` SET `field` = '1' WHERE `id` = '123'

I made a typo and entered the following:

UPDATE `table` SET `field` = '1' WHERE `id` - '123'

Yup.  A simple dash (-) instead of an equal (=) sign.  I know, I’m supposed to do a SELECT before, or use a transaction, or, at least, have a backup of the database – depending on which school of thought you follow the most.  I didn’t have any of these.  And once the query went in, there was little I could do.

Guess what the query does?  I’m still looking into the exact consequences, but so far it looks like ALL records EXCEPT the one with id 123 have been updated.

Gladly I have some history revision tables from which I could restore most of the state.  But this is scary dangerous anyway.  I would expect a syntax error intuitively.

Dear Google, here’s what I want for the next Olympics …

… I hope that in accordance with your missionto organize the world’s information and make it universally accessible and useful“, you will make that tiny little green “Live” word into a YouTube link, where I would be able to watch the game, without caring about in which country I currently am or which device I currently use.

ice hockey