PyDocs

Nav

Data Persistence

Cursor.lastrowid

sqlite3

attribute of Cursor
Read-only attribute that provides the row id of the last inserted row. It is only updated after successful INSERT or REPLACE statements using the execute() method. For other statements, after executemany() or executescript(), or if the insertion failed, the value of lastrowid is left unchanged. The initial value of lastrowid is None.
Changed in 3.6
  • 3.6: Added support for the REPLACE statement.
0 Examples
No examples for sqlite3/Cursor.lastrowid.
See Also
No see-alsos for sqlite3/Cursor.lastrowid
0 Notes
No notes for Cursor.lastrowid