MySQL Forums
Forum List  »  Newbie

Re: Simple Delete Query
Posted by: Ricco Semento
Date: April 24, 2014 07:36AM

Well that didn't work.

I ran SELECT * FROM wlje_content WHERE created > 2013-04-20 AND sectionid = 1 and it showed me all the entries. Over 100k. I can't delete them even 500 at a time, it will take forever. So I ran

DELTE FROM wlje_content WHERE created > 2013-04-20 AND sectionid = 1

But it deleted ALL from sectionid1 not just those that are lower than 2013-4-20.

So how do I edit it to maybe do partial match?

Like

delete FROM wlje_content WHERE created > 2013 AND sectionid = 1
^
partial match

That way I can delete all the entries that have "2013" in it, but leave the ones that don't. Even though the entries are formated such as this "2013-3-23 19:34:34"

Options: ReplyQuote


Subject
Written By
Posted
April 22, 2014 08:17AM
April 22, 2014 07:12PM
April 22, 2014 09:23PM
April 24, 2014 06:36AM
April 24, 2014 06:38AM
Re: Simple Delete Query
April 24, 2014 07:36AM
April 24, 2014 08:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.