比如现在有表:
PRODUCT(name, manufacturer, price, description, quality, mdate)
其中(name, manufacturer) is a primary key
那么:
SELECT *
FROM PRODUCT
WHERE name = 'computer'and manufacturer = 'IBM';
这个会按index查询吧,
那如果我把and两边的位置调换一下呢:
SELECT *
FROM PRODUCT
WHERE manufacturer = 'IBM' AND name = 'computer';
这样还会按index查询吗?
------解决方案--------------------