Other posts
- 01/03/2007: Quote Unquote
- 01/12/2007: Huh?
- 27/10/2006: Browser Browser
- 04/05/2007: Pain Is...
Posted on May 4th, 2007 in SQL Server.

| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Apr | Sep » | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||
Chris Pietschmann says:
Added on May 4th, 2007 at 5:14 pmDoh!! I did stuff like that (thankfully only on dev databases) quite a bit when I first got started with SQL, back in the day with Query Analyzer.
John S. says:
Added on May 4th, 2007 at 5:30 pmThere definitely should be an option to disable running only the selected text. Or an option to warn on deletes.
Ayende Rahien says:
Added on May 4th, 2007 at 6:57 pmthere is, it is called implicit transactions, and it allows you to do:
rollback
Of course, it also requires commit, which can drive you nuts.
Dantoz says:
Added on May 16th, 2007 at 7:00 amCan Microsoft come up with a confirmation message tool when executing such messages.
Something like “Are you sure you want to execute this statement”
lb says:
Added on June 22nd, 2007 at 7:14 am@John S. “an option to warn on deletes.”
That’s such a simple solution — but so perfect.
Just a brain dead little bit of code that says:
if YourSql.ToUpper().Contains(”DELETE”) or YourSql.ToUpper().Contains(”DROP”) then
If MessageBox.Show(”Do you really want to exec this delete/drop statement?”, Dialog.OKCancel) == DialogResult.Cancel then Return
end if
So much developer grief, gone!