Can anyone point me in the right direction here? I’m updating a table at work and SQL Yog has been hung for over 30 minutes. I didn’t want to hit CTRL-ALT-DELETE and terminate the task because I wasn’t sure if it would somehow mess up production if I kill the query before it’s done?
This is what I ran:
USE prodWNG
UPDATE customerItemEntry
SET orderType = 12;
WHERE customerNumber = 546339;
[edit: ok you got me, this was a joke – but honestly, I’ve seen this happen. It also doesn’t seem to matter how much experience a person has. I’ve seen team leads hose production by running a bad query such as the one above, it really can strike anyone, anywhere. So, thanks for the fun responses, but this is a good reminder for us all to be careful!]
Try this out.
Note the placement of the semi-colons. Since you put it before the condition, you’d update the entire table’s orderType to 12 if the query were to be successfully ran. (hopefully you were in a transaction?)
Kill the query if you can, if successful, you’ve updated the whole table.