【发布时间】:2012-05-25 11:22:57
【问题描述】:
我有一个包含 100 列或更多列的表,这些列的值可能是“yes”或“no”。
我想根据用户的请求(复选框值表单)进行选择,以提取所有值为“yes”的行。所以一个例子可能是:
-用户选择了 checkbox1 checkbox4 和 checkbox7 其他的都没有被选中。
查询可能是:
从表中选择名称,其中 (col1 = yes or col4 = yes or col7 = yes) AND (col2= no and col3 = no and all other columns are set to no)
如何在 android 查询中实现这一点?顺便说一下,我发现这个实现不是很优雅,有人可以建议我用其他实现来实现这个目标吗?
【问题讨论】:
标签: android sqlite select where