Function Database.lastInsertRowid

Returns the rowid of the last INSERT statement.

long lastInsertRowid();