我有一个有很多列的sqlite表,我试图为用户提供访问的多个条件(即选项)。这就产生了一系列包括以下内容的结果
1 "SELECT * FROM table where apple >= 3 and orange >= 1;"
2 "SELECT * FROM table where apple = 0 and orange >= 1;"
3 "SELECT * FROM table where apple = 4 and juice = 0;"是否有任何方法将上述所有内容组合在一个db.query()语句中,并防止结果重复?
提前谢谢。
发布于 2014-06-15 14:54:07
可能你在找这个
SELECT * FROM table where (apple >= 3 and orange >= 1) or (apple = 0 and orange >= 1) or (apple = 4 and juice = 0)https://stackoverflow.com/questions/24230757
复制相似问题