我正在使用 MySQL v5.5.27。我通常会这样写这个 SELECT 语句:
SELECT DISTINCT *
FROM table
WHERE something = 'this'
OR something = 'that'
OR something = 'other'
AND thingamajig = 'one'
OR thingamajig = 'two'
但是这个 SELECT 语句会提供完全相同的结果吗?
SELECT DISTINCT *
FROM table
WHERE something = ('this' OR 'that' OR 'other')
AND thingamajig = ('one' OR 'two')
我试过运行它,它似乎正在工作。只是想确保第二种做事方式不会以某种我想不到的方式返回错误数据。
感谢您的任何见解,帮助!