Can be used with MySQL and PostgreSQL servers to get the value of the ID field after executing INSERT statement.
property LastInsertId: Int64;
The LastInsertId property can be used with MySQL and PostgreSQL servers to get the value of the ID field after executing INSERT statement.
For MySQL LastInsertId returns the ID generated for an AUTO_INCREMENT column by the previous query. Use this property after you have performed an INSERT query into a table that contains an AUTO_INCREMENT field.
For PostgreSQL LastInsertId returns the OID value generated for an OID column in a table with OIDs by the previous query.
If the query does not perform insertion into a table that contains field of the types specified above, the value of LastInsertId won't be defined.