public class MySqlite extends SQLiteOpenHelper { public MySqlite(Context context) { super(context, "MyInfo", null, 2); } public MySqlite(Context context, String name, SQLiteDatabase.CursorFactory factory, int version, DatabaseErrorHandler errorHandler) { super(context, name, factory, version, errorHandler); } @Override public void onCreate(SQLiteDatabase db) { String sql="create table mytable(id integer primary key autoincrement," + "url varchar," + "detectionItem varchar," + "categoryTitle varchar)"; db.execSQL(sql); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } }
添加数据库
最新推荐文章于 2023-09-24 19:45:00 发布