SELECT last_insert_rowid() -- same as select @@identity
last_insert_rowid () The last_insert_rowid () function returns the ROWID of the last row inserted from the database connection that calls this function. The last_insert_rowid () SQL function is a wrapper around the C / C ++ sqlite3_last_insert_rowid () interface function.
Pranay rana
source share