I have comment in listView "www.google.lv".
If I am trying to put again the same comment("www.google.lv"), it should create this comment, but the same previous comment should be delete from database. They should not be duplicated, but is created as the lastest comment.
Is it possible?
Simply use the command
INSERT OR REPLACE ....Addition
Since you are using ContentValues to insert data into your database. Call
database.insertWithOnConflict(), instead ofdatabase.insert(). Try:(This assumes that you have an appropriate
UNIQUEconstraint on your database…)