我想要做的伪查询如下:
从mytable中选择* where(myintvalue = 0 OR 1)AND anothervalue =“SomeValue”
上述语法的正确语法是什么?
答案 0 :(得分:1)
使用IN
子句
Select * from mytable where myvalue IN( 0,1) AND anothervalue = "SomeValue"
答案 1 :(得分:1)
WHERE (myintvalue = 0 OR myintvalue = 1)
/* or */
WHERE myintvalue IN (0, 1)
答案 2 :(得分:1)
SELECT * FROM mytable where (myintvalue = 0 OR myintvalue = 1) AND anothervalue= 'SomeValue';
或
SELECT * FROM mytable where myintvalue in (0,1) AND anothervalue= 'SomeValue';
应该做的伎俩