I wanted to add a new column to an Android SQLite Database and then I recieved errors. What should I do and how? I thought that I have to delete the table and create a new one but i don’t know how.
Share
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.
The easiest way to do this is to add some SQL to the
onUpgrade()method in yourSQLiteOpenHelperclass. Something like:Obviously, the SQL will differ depending on the column definition.