Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It does annoy me that the WHERE clause has to go at the end. I usually end up typing the WHERE clause first when working live on something important.

Same with rm -Rf /foo/bar. There's a moment when pressing enter will do the wrong thing. I usually use relative paths to avoid this, but I have had to repair the damage for someone who actually managed to rm -Rf / by accident due to this.



That is why I run a ls command before doing rm. (been bitten but accidentally hitting Return key instead of Shift on laptop :()

Also for Update/Delete query I run the equivalent select (rows or count(*) ) query first, just to make sure.

also make sure to write where predicate before completing the whole sql. (The sql does not go through by accidentally hitting enter, before the whole statement is written)

tl;dr - Run read operation before doing write/update/delete operations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: