Name

sqlite3_total_changes() — Get the total number of changes made by a database connection

Definition

int sqlite3_total_changes( sqlite3* db );
db

A database connection.

Returns

The number of rows modified by this database connection since it was opened.

Description

This function returns the number of table rows modified by any INSERT, UPDATE, or DELETE statements executed since the database connection was opened. The count includes modifications made by table triggers and foreign key actions, but does not include deletions made by REPLACE constraints, rollbacks, or truncated tables. Rows that are successfully modified within an explicit transaction and then subsequently rolled back are counted.

This function is exposed to the SQL environment as the SQL function total_changes().

See Also

sqlite3_changes(), count_changes [PRAGMA, Ap F], total_changes() [SQL Func, Ap E]

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.