Code example for SQLiteDatabase

Methods: execSQLupdate

0
		@Override 
		public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
		{ 
			if (oldVersion == 2)
			{ 
				db.execSQL("ALTER TABLE subs ADD COLUMN _pvt text null");
				ContentValues args = new ContentValues();
				args.put(KEY_PRIVATE, "0");
				db.update(SUBS_TABLE, args, null, null);
			} 
			db.execSQL("CREATE TABLE clips (_id integer primary key autoincrement, "
				+ "date text not null, clip text not null);"); 
		} 
	} 
 
	/** 
	 * Opens the database helper for writing and returns the database adapter. 
	 * 
	 * @return	Database adapter associated with the database. 
	 */ 
	public subsDbAdapter open() throws SQLException