List:General Discussion« Previous MessageNext Message »
From:Colin McKinnon Date:September 29 1999 12:48pm
Subject:Re: newbie question on deleting data
View as plain text  
At 23:32 28/09/99 +0800, thomas wrote:
>Hi folks,
>
>I'm new to MySql and have a syntax question.  If I want to remove
>multiple entries, how can I do this in one command?
>
>ie.
>
>delete from tablename where (id=102);     #this works fine for one id
>but is tedious after a while
>delete from tablename where (id=102 103 104 105...); # how about
>something to delete multiple entries.. am I close?
>
>Thanks,
>Tom
This is a query about the SQL language, and not about MySQL; i.e. a bit OT
for the list. If you have a look thru the archive you'll find references to
where to learn more about SQL.

To answer your question:

	DELETE FROM tablename WHERE id>=102 AND id<=211;
would delete 102 - 211 inclusive.

HTH

Colin

Thread
newbie question on deleting datathomas28 Sep
  • Re: newbie question on deleting dataMartin Ramsch28 Sep
  • Re: newbie question on deleting dataJeff Urban28 Sep
  • Re: newbie question on deleting databpaduraru28 Sep
  • Re: newbie question on deleting dataTonu Samuel28 Sep
  • Re: newbie question on deleting dataBob Kline28 Sep
  • Re: newbie question on deleting dataColin McKinnon29 Sep