-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clearing sqlite_sequence is not working in android room #330
Comments
I'm sure room is using "sqlite_sequence".. But I too face this problem |
Im also faced with the same problem! not sure how I can reset auto increment id to 0 |
Same problem. I want to clear a table ant reset auto increment. I tried using TRUNCATE, but it is not supported by Room. |
I'm facing the same problem too : https://stackoverflow.com/questions/53573731/not-able-to-update-sqlite-sequence-table-using-roomdatabase-query Any idea? |
As per the answers given here, and here, and here, I could do it as following: |
This doesn't seem to be an issue with the samples. You can file an issue against Room on the issue tracker if you're still having an issue / have a feature request. |
Following code is not resetting/clearing the auto increment id to 0
database = Room.databaseBuilder(getApplicationContext(), AppDatabase.class,DatabaseMeta.DB_NAME).build();
database.query("DELETE FROM sqlite_sequence WHERE name = ?", new Object[]{"tableName"});
Is there any other way to clear "sqlite_sequence"?
Android room is not using "sqlite_sequence" for auto increment i think, not sure.
The text was updated successfully, but these errors were encountered: