How can I update the KEY_ROWID number in SQLite database after deleting a row from the database? CASE 1: For example, if I have five rows in the database, maximum KEY_ROWID is
The solution is that rewriting the table with a new array or list ;
reWriteTable is will allow automatic sorting of rows.
private void reWriteTable(){
if(db.listOfDate().size()!=0){
String[] name =new String[db.listOfDate().size()] ;
String[] note=new String[db.listOfDate().size()] ;
String[] date =new String[db.listOfDate().size()];
String[] time =new String[db.listOfDate().size()];
String[] total =new String[db.listOfDate().size()];
for(int i=0;i
Define deleting table in Database.java ;
protected void deleteTable(){
SQLiteDatabase db=this.getWritableDatabase();
db.execSQL(" drop table if exists " + TABLO_UYGULAMALAR + ";");
onCreate(db);
}