The old "DELETE FROM some_table" <enter>
Crap.. I meant "DELETE FROM some_table WHERE id=1"
sighs
Crap.. I meant "DELETE FROM some_table WHERE id=1"
sighs
More commands could use options to adjust how big guns they let you fire at your feet with...
http://dev.mysql.com/doc/refman/5.0/en/mysql-tips.html#safe-...
WHERE id = 1 ctrl + a DELETE FROM....
Found it's also helpful for writing SELECTS and avoiding the whole "oh crap, now let's load the entire DB" type of moments.
select * -- delete
from sometable
where id = 1
Then you can run the whole thing to see what would be deleted, and highlight starting at the word delete to actually delete.All my deletes written first as selects now, as a sibling comment suggested.
Oh yeah, you're using a toy database aren't you.