Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
Luke
- The Ninja Space Mod
- Posts: 6424
- Joined: Fri Aug 05, 2005 1:53 pm
- Location: Paradise, CA
Post
by Luke »
what would be the syntax for deleting more than one row... would you have to just do multiple queries like this...
Code: Select all
DELETE FROM table WHERE id = 3;
DELETE FROM table WHERE id = 6;
DELETE FROM table WHERE id = 19;
DELETE FROM table WHERE id = 36;
Or is there some other way that would be better?
Last edited by
Luke on Thu Nov 10, 2005 1:49 pm, edited 1 time in total.
-
hawleyjr
- BeerMod
- Posts: 2170
- Joined: Tue Jan 13, 2004 4:58 pm
- Location: Jax FL & Spokane WA USA
Post
by hawleyjr »
Code: Select all
DELETE FROM table WHERE id = 3 or id = 6 or id = 19 or id = 36
-
Luke
- The Ninja Space Mod
- Posts: 6424
- Joined: Fri Aug 05, 2005 1:53 pm
- Location: Paradise, CA
Post
by Luke »
Thanks