On Tue, 1999-09-28 23:32:46 +0800, Thomas wrote:
> 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?
> 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?
DELETE FROM tablename WHERE id IN (102, 103, 104, 105, ...);
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26 E4 EC 80 58 7B 31 3A D7