Possible to determine number of rows affected by a SQLite update or delete command?
Kushal Kumaran
kushal.kumaran+python at gmail.com
Tue Nov 30 04:21:14 EST 2010
On Tue, Nov 30, 2010 at 2:29 PM, <python at bdurham.com> wrote:
> Is there a cursor or connection property that returns the number of rows
> affected by a SQLite update or delete command?
>
The cursor has a rowcount attribute. The documentation of the sqlite3
module says the implementation is "quirky". You might take a look at
it and see if it fits your needs.
> Or, if we want this information, do we have to pre-query our database for a
> count of records that will be affected by an operation?
>
--
regards,
kushal
More information about the Python-list
mailing list