0

如何优化此查询?

DELETE FROM item WHERE id = 1002;
DELETE FROM item WHERE id = 1003;
DELETE FROM item WHERE id = 102232;
DELETE FROM item WHERE id = 12322;

这是一条出路吗?

DELETE FROM item WHERE id = 1002 OR id = 1003 OR id = 102232 OR id = 12322;

我非常需要专家的头脑!

4

1 回答 1

2
DELETE FROM item WHERE id IN (1002,1003,102232,12322)

它更简单,但是优化(更快?)是什么意思

于 2012-06-29T09:51:24.463 回答