I am using sqlite in my android application.
When i delete all the records from the table then also the next entry is the increment of the last serial.If i delete all records from table,I need to start it from 1 How to do it?
It sounds like you want to reset your AUTO_INCREMENT to 0.
DELETE FROM tablename;
DELETE FROM SQLITE_SEQUENCE WHERE name='tablename';
You can do it like this,
delete from sqlite_sequence where name='your_table';
Altering SQLITE_SEQUENCE Table is not a good option because it is likely to disturb AUTOINCREMENT Key generation Algorithm. You can see this Answer
.