应届生招聘去哪个网站,网站后台中表格制作,南京seo优化公司,淘宝上网站建设续费SQLiteDatabase 用来管理SQLite数据库的类。SQLiteDatabase新增、修改、删除和查询数据库数据的方法#xff0c;还可以执行其他常见的数据库管理任务。 方法 描述 (void) execSQL(String sql) 执行一个SQL语句的方法 (long) insert(String table,String nullColumnHack,Co… SQLiteDatabase 用来管理SQLite数据库的类。SQLiteDatabase新增、修改、删除和查询数据库数据的方法还可以执行其他常见的数据库管理任务。 方法 描述 (void) execSQL(String sql) 执行一个SQL语句的方法 (long) insert(String table,String nullColumnHack,ContentValues values) 添加数据行的方法 (int) update(String table, ContentValues values, String whereClause, String[] whereArgs) 更新数据行的方法 (int) delete(String table,String whereClause,String[] whereArgs) 删除数据行的方法 一、数据新增 数据新增的三种方法任选一种即可。建议使用第三种方法来实现数据的新增因为不用自己拼接字符串更安全。 二、数据修改 数据修改的三种方法任选一种即可。建议使用第三种方法来实现数据的修改因为不用自己拼接字符串更安全。 三、数据删除 数据删除的三种方法任选一种即可。建议使用第三种方法来实现数据的删除因为不用自己拼接字符串更安全。 四、数据查询 Cursor rawQuery(String sql, String[] selectionArgs) • 参数说明String sql 要执行的查询语句可以使用占位符String[] selectionArgs 参数数组 • 返回值Cursor 结果集相当于ResultSet Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) •参数说明String table表名称 String[] colums列名称数组 String selection条件子句String []selectionArgs条件语句的参数数组 String groupBy分组字段String having分组条件;String orderBy排序字段 •返回值Cursor 结果集相当于ResultSet 转载于:https://www.cnblogs.com/ccshxt/p/5243794.html