Open qu4sar opened 7 years ago
I created this function to clear all table records. public static void clearTable(Class<? extends Model> type) { TableInfo tableInfo = Cache.getTableInfo(type); ActiveAndroid.execSQL(String.format("DELETE FROM %s;", tableInfo.getTableName())); ActiveAndroid.execSQL( String.format("DELETE FROM sqlite_sequence WHERE name='%s';", tableInfo.getTableName())); }
Hope it helps.
How to delete one record from Table using Where Clause?
How i can delete all record in a table ? i try with
new Delete().from(MyClass.class);
but nothing