Never a Doh! moment.

Matthew Ross Walker matt at
Wed Nov 30 15:47:21 MST 2005

Chris Carey wrote:
> My last DOH moment was when writing some SQL statements and I forgot
> the WHERE clause ...
> DELETE FROM billing;
> instead of
> DELETE FROM billing WHERE id=123;
> The first statement deletes every single record in the database table.
> I sure wont make that mistake again.

I did something very similar once. I was working on testing a script to
transform some data in an important table, so I was working with a copy
of the table, and truncating it after each run of the script.

This was all fine and dandy until I truncated the wrong copy. Of the
lineitems table. For an ecommerce system serving 50+ sites.


Thank goodness we did nightly backups. We lost about 6 hours of
lineitems, and were able to reconstruct 95% of those from paper copies
of the orders that the call centers kept. Whew.

Matthew Walker
The Brain Garden, Inc
matt at
Work: (801) 655-1075
Home: (801) 491-2079
Page: (801) 283-9887 (Emergencies Only)

Random Quote:
Men of lofty genius when they are doing the least work are most active.
		-- Leonardo da Vinci
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : 

More information about the PLUG mailing list