SQLite Forum

how to check update statement really modify a record
Login
Looking at the generated bytecode suggests that SQLite implements the UPDATE statement as an INSERT INTO ... SELECT.

Given a table T with three columns a,b,c

UPDATE T SET a = 5 WHERE b = 7;

is implemented as

INSERT INTO T SELECT 5,b,c FROM T WHERE b=7;

and the sqlite3_changes() function returns the cardinality of the SELECT part.