前端之家收集整理的这篇文章主要介绍了
sqlite 多条件查询,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
String[] columns={"kind","textnum","region"};//你要的数据
String 条件字段="NUMWEEK=? and YEAR=?",String[] selectionArgs={”星期一","2013"};//具体的条件,注意要对应条件字段
Cursor cursor=db.query(表名,columns,条件字段,selectionArgs,null,null);
String strsql = "update appsort set number=number+1 where activityname='"+appSortInfo.getActivityName()+"' and packagename='"+appSortInfo.getPackageName()+"'";
select packagename from appsort where number >0 order by number desc limit 0,20
String sql = "select * from appsort where activityname=? and packagename=?";
Cursor mCursor = db.rawQuery(sql,new String[]{"com.android.calendar.AllInOneActivity","com.google.android.calendar"}); mCursor.moveToNext();
原文链接:https://www.f2er.com/sqlite/200659.html