我想做的伪查询如下:
Select * from mytable where (myintvalue = 0 OR 1) AND anothervalue = "SomeValue"
上面的正确语法是什么?
我想做的伪查询如下:
Select * from mytable where (myintvalue = 0 OR 1) AND anothervalue = "SomeValue"
上面的正确语法是什么?
使用IN
子句
Select * from mytable where myvalue IN( 0,1) AND anothervalue = "SomeValue"
WHERE (myintvalue = 0 OR myintvalue = 1)
/* or */
WHERE myintvalue IN (0, 1)
SELECT * FROM mytable where (myintvalue = 0 OR myintvalue = 1) AND anothervalue= 'SomeValue';
或者
SELECT * FROM mytable where myintvalue in (0,1) AND anothervalue= 'SomeValue';
应该做的伎俩