i am devloping a game application in android using sqlite connectivity.. all thing is going good.. but now i want to do like that, so only past 20 data remain in my database.. that mean at every insert data statment i want to delete last data remaining last assending 20 data
i am devloping a game application in android using sqlite connectivity.. all thing is
Share
this can be done using sql query. First retrieve total number of records available in table.
then use if-else condition.
if number of records>20
then {
delete a record according to condition;
insert new record in table.
}
else
insert new record in table.