Name
sqlite3_changes() — Get the number of changes made by an SQL statement
Definition
int sqlite3_changes( sqlite3* db );
-
db A database connection.
- Returns
The number of rows modified by the last SQL statement that was executed.
Description
This function returns the number of rows that were modified by
the most recent INSERT,
UPDATE, or DELETE statement. Only rows
directly affected by the table named in the SQL command are
counted. Changes made by triggers, foreign key actions, or
conflict resolutions are not counted.
If called from within a trigger, the count only includes modifications made at this trigger level. It will not include changes made by an enclosing scope, nor will it include changes made by subsequent trigger or foreign key actions.
This function is exposed to the SQL environment as the SQL
function changes().
See Also
sqlite3_total_changes(), count_changes [PRAGMA, Ap F], changes() [SQL Func, Ap E]
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access