【发布时间】:2017-02-17 06:51:10
【问题描述】:
我的查询是SELECT DefaultId FROM tblsample where ('567' = DefaultId) || ('567' = Name)
在上面的查询中
table name = tblsample
Column Names = DefaultId , Name
Input Value = 567
现在我想检查该值在表中的哪一列中可用并返回其 DefaultId。我能够在 Sqlite 中实现这一点,想知道是否还有更好的方法来优化查询和在 android 中使用
database.query(boolean distinct, String table, String[] columns,String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)
我必须在 android 中使用哪个查询。
【问题讨论】:
标签: android sqlite android-sqlite android-cursor