I have a dialog that has 3 buttons (OK, Alterar, Delete) so when i click in Alterar it goes to another activity to alter the values, but i dont know the code to alter it.
I only know 2, which are .put/.insert and .delete .
Now what about alter?
2 rows: nome , telefone
Allright, this is an answer to your edit.
Let’s say your table containing your rows has the name Person.
Now you want to change the phone number of the person “MrSmith” to 123456789.
First, enter the new values you want to change.
Maybe you dont need to put the name back in again, it was some time ago i did this. You can try out yourself 🙂
Now lets insert these into the database!
The ? in where string is replaced with MrSmith when we do db.update(…).
Now SQL knows what row to update and what data it should update it with. Let’s commit!
I hope this helps! Otherwise you need to check out how SQL Statements are done.