Extracted from Pike v8.0 release 28 as of 2015-09-20.
   

Method Sql.tds()->insert_id()


Method insert_id

int insert_id()

Description

Fetch the identity of the last insert (if available).

This performs the query "SELECT @@identity AS insert_id".

Returns

Returns the identity of the last insert as an integer if available. Otherwise returns 0 (zero).