DB.LastInsertId (gb.db2)

Static Property Read LastInsertId As Long

Return the value of the last serial field used in an INSERT statement.

An error is raised if the database driver does not support this feature (for example gb.odbc).