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
, notid = 1234
.In MySQL the statement (
value - value
) isfalse
if it evaluates to0
, andtrue
if 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".
Internships: What is the most Catastrophic mistake made by an intern at a company?