Internships: What is the most Catastrophic Mistake made by an intern at a company? by Dan Ray
Answer by Dan Ray:
I sat at the MySQL console for the production web application database and typed:
DELETE FROM tablename WHERE id - 1234;
…and hit return.
Note that I typed
id - 1234, not
id = 1234.
In MySQL the statement (
value - value) is
falseif it evaluates to
trueif it evaluates to anything else. I just asked the database to delete all rows where the ID minus 1234 was not zero.
It replied "80,000 rows deleted".