쿼리문으로는 방법이 있는지는 모르겠군요..
제 생각에는 가장 쉬운방법으로는 db_version을 이용하는 방법이 있겠구요
아니면 쿼리를 해서 컬럼 유무을 체크해야 할 듯 합니다.private boolean existsColumnInTable(SQLiteDatabase inDatabase, String inTable, String columnToCheck) {
try{
//query 1 row
Cursor mCursor = inDatabase.rawQuery( "SELECT * FROM " + inTable + " LIMIT 0", null );
//getColumnIndex gives us the index (0 to ...) of the column - otherwise we get a -1
if(mCursor.getColumnIndex(columnToCheck) != -1)
return true;
else
return false;
}catch (Exception Exp){
//something went wrong. Missing the database? The table?
Log.d("... - existsColumnInTable","When checking whether a column exists in the table, an error occurred: " + Exp.getMessage());
return false;
}
}