SQLitDatabase常用方法
1、db.insert(table,nullColumnHack,values)
第一个参数是表名,第二个参数是空的默认值,第三个参数是ContentValues类型的一个封装了列名称和列值得Map;
2、db.detele(table,whereClause,whereArgs)
第一个参数是表名,第二个参数是删除条件,第三个参数是删除条件值数组;
3、db.update(table,values,whereClause,whereArgs)
第一个参数是表名,第二个参数是更新行列ContentValue类型的键值对(Map),第三个参数是更新条件(where子句),第四个参数是更新条件数组;
4、db.query(table,columns,selection,selectionArgs,groupBy,having,orderBy)
5、db.execSQL(sql)
执行sql语句,这种方式效率最高,也是最常用的,直接写sql语句执行;
6、db.rawQuery(sql,selectionArgs)