<div class="meta" robots="noindex">

</div>

Method

|                                        |
|----------------------------------------|
| MySQLCommunityServer.LastInsertedRowID |

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2024r2. Please use the `Database.AddRow<database.addrow>` method signature that returns a rowid as a replacement.

</div>

# Description

Returns an `Int64</api/data_types/additional_types/int64>` containing the value of the primary key column (or the AUTOINCREMENT column if there is no primary key column) for the last row added to any table in the database.

# Compatibility

All project types on all supported operating systems.
