SQLite Forum

how to check update statement really modify a record
Login
There are two non-error situations which might prevent <code>UPDATE</code> from making any changes:

1.  a <code>WHERE</code> clause which is satisfied by no rows
2. the <code>WHERE</code> clause identifies rows, but the values in those rows are the same as the 
<code>SET</code> clause would change them to

In both cases the <code>UPDATE</code> command is a complete success.  SQLite did exactly what you told it to, and ran into no problems while doing it, so it returns SQLITE_OK.  Examples of failure would be "no such table" or "database locked".

If you want to know whether rows will be updated by <code>UPDATE</code>, do the equivalent <code>SELECT</code> first, and find out whether any rows are returned.  Or use a function which counts changes, as recommended upthread.