请教 sql server IN vs. OR# Database - 数据库
n*6
1 楼
SELECT ProductID, ProductName
FROM Product
WHERE ProductName = 'Apple' OR ProductName = 'Orange'
vs.
SELECT ProductID, ProductName
FROM Product
WHERE ProductName IN ('Apple', 'Orange')
请教一下,两个performance有什么区别?
FROM Product
WHERE ProductName = 'Apple' OR ProductName = 'Orange'
vs.
SELECT ProductID, ProductName
FROM Product
WHERE ProductName IN ('Apple', 'Orange')
请教一下,两个performance有什么区别?