I want to keep only five records in my SQLite database if a new value is stored means i want to delete the last record in android application .Please any one help me how to do this
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to write the method of get the count(number of records in sqlite DB), & check if count is 5 then before inserting record into DB you can delete the existing row which you want to remove.( For this also you need to write the method which accepts the some unique key so that you can delete that row only.)