Function Connection.lastInsertID

After a command that inserted a row into a table with an auto-increment ID column, this method allows you to retrieve the last insert ID.

ulong lastInsertID() pure nothrow @property @safe const;