2011-03-29 2 views

답변

1

나는 simpleQueryForLong을 찾고 있습니다.

SQLiteDatabase db; 
// initialize the db 
SQLiteStatement statement = null; 
try { 
    db.compileStatement("select max(_id) from table"); 
    int max = statement.simpleQueryForLong(); 
} catch (SQLException e) { 
    // handle 
} finally { 
    if (statement != null) { 
     statement.close(); 
    } 
} 
+0

물론 설명서를 확인해야합니다. –

+0

정확히 내가 한 일은 완벽하게 작동합니다. –

관련 문제