我想從我的SQLite數據庫中刪除這樣的幾行:SQLiteException附近的「<」,同時刪除查詢
dbUtilsObj.delete(EngineUtiReport.TABLE_NAME,
EngineUtiReport.Columns.KEY_ENGINE_UTI_UNIX_TIME + DBUtils.IS_LESS_THAN,
new String[] { String.valueOf(nDaysOldUnixTime) });
在上面的代碼nDayOldTimeInMills = 1429963811949
和DBUtils.IS_LESS_THAN = " < "
。
但我得到這個語法錯誤例外,我只是不能找出我做錯了:
android.database.sqlite.SQLiteException: near "<": syntax error (code 1): ,
while compiling: DELETE FROM engine_utilization_report WHERE unix_time <
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1113)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:686)