2

I have Android SQLite table in db it looks like this.

id | client | content
---|--------|--------
 1 |   34   |   cba
 2 |   45   |   abc

When i want to update one row, i really need that sqlite check if new values is exactly the same as in updated row and does not do anything or throw exception.

For example if i try to update row with id 1 (in my example table above) with values (34, cba) i want know that values is the same.

How to figure out sqlite database to perform this check?

Alexander
  • 3,129
  • 2
  • 19
  • 33
ant
  • 397
  • 1
  • 5
  • 19
  • 1
    visit http://stackoverflow.com/questions/20687095/android-sql-check-if-whole-row-already-exists-in-database – Jitesh Upadhyay Feb 20 '14 at 08:34
  • 1
    visit http://stackoverflow.com/questions/17160132/check-if-the-row-already-exist-in-database-in-android – Jitesh Upadhyay Feb 20 '14 at 08:34
  • 1
    What is wrong with updating the same values again? If you don't want to you can read the values first and compare then in Java code. But I see no reason not to overwrite with the same values. – doorstuck Feb 20 '14 at 08:39
  • when i update by the same values my ContentProvider think that i update DB, but it is not so, cause values does not change. – ant Feb 20 '14 at 13:14

0 Answers0