时间:2021-07-01 10:21:17 帮助过:1人阅读
原生sql进行查询类操作
Cursor rawQuery(String sql,String[] selectionArgs) 执行带参数的select语句;
String sql = "SELECT * FROM student WHERE _id > ?"; Cursor cursor = db.rawQuery(sql,new String[]{"4"}); while (cursor.moveToNext()){ Log.d(TAG, "name : "+cursor.getString(cursor.getColumnIndex("name"))); }
SQLite的使用(一):简介及原生SQL操作数据库
标签: