public long insert(User user) {
ContentValues values = new ContentValues();
values.put("name", user.username);
return dbInstance.insert(DB_TABLENAME, null, values);
}AndroidsqliteinsertContentValues
ContentValues values = new ContentValues();
values.put("name", user.username);
return dbInstance.insert(DB_TABLENAME, null, values);
}AndroidsqliteinsertContentValues
db.execSQL("create table if not exists " + TAB_NAME + " (" + KEY_ID
+ " integer primary key," + KEY_RECORD + " integer," + KEY_LEVEL + " integer)");
}
比如可以这样写
db.execSQL(stmt);
还有这个contentValue网上说和java中的map机制很像,我不是很明白?
还有这个contentValue网上说和java中的map机制很像,我不是很明白其中的奥妙,求解释
还有这个contentValue网上说和java中的map机制很像,我不是很明白其中的奥妙,求解释呵呵意思就是说和Map使用的方法 语句结构 效果差不多 只是contentValue 实用于SQLlite数据库操作