Hacker News new | ask | show | jobs
by wiredone 2965 days ago
Because nearly everyone I know has some memory where at a less experienced point in their engineering career they wrote:

delete from ImportantTable where id = 1234

... and forgot to select the second line in some query editor before running.

1 comments

There is usually an option to disable delete statements which do not contain a where clause. And if you really want to run that statement you'd need to write:

    delete from ImportantTable where 1 = 1;
But yea, I get your point.
For mysql it is "--i-am-a-dummy". I wish SQL supported putting the where clause first: "where X = Y update..."