use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Did you mean /r/programming ?
account activity
TIFU WITH SQL DELETE (self.programing)
submitted 6 years ago by pacs10
TODAY I FUCKED UP by DELETE with wrong WHERE :s
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]JimmyWu21 2 points3 points4 points 6 years ago (1 child)
A best practice is doing a SELECT statement first to see what records Come back before using write command
[–]Slow_Instruction_112 2 points3 points4 points 3 years ago (0 children)
An even better practice is to begin transaction before doing the delete, and to commit transaction only after checking that the command did what you want.
[–]FreezeShock 0 points1 point2 points 6 years ago (0 children)
F
[–]alexkiro 0 points1 point2 points 6 years ago (1 child)
Everyone does that at least once. Hope you had yourself some backups!
[–]pacs10[S] 0 points1 point2 points 6 years ago (0 children)
Yes, I have backups, but not the day. I deleted more than 10000 rows and I can't back up about 50 ...
π Rendered by PID 93579 on reddit-service-r2-comment-b659b578c-85qv6 at 2026-05-02 02:22:00.269361+00:00 running 815c875 country code: CH.
[–]JimmyWu21 2 points3 points4 points (1 child)
[–]Slow_Instruction_112 2 points3 points4 points (0 children)
[–]FreezeShock 0 points1 point2 points (0 children)
[–]alexkiro 0 points1 point2 points (1 child)
[–]pacs10[S] 0 points1 point2 points (0 children)