Skip to content

Commit

Permalink
system variables: document last_insert_id
Browse files Browse the repository at this point in the history
  • Loading branch information
morgo committed Sep 20, 2021
1 parent ca96473 commit b442c1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ mysql> SELECT * FROM t1;
- Unit: Seconds
- This variable represents the idle timeout of the interactive user session, which is measured in seconds. Interactive user session refers to the session established by calling [`mysql_real_connect()`](https://dev.mysql.com/doc/c-api/5.7/en/mysql-real-connect.html) API using the `CLIENT_INTERACTIVE` option (for example, MySQL shell client). This variable is fully compatible with MySQL.

### last_insert_id

- Scope: SESSION
- Default value: `0`
- This variable returns the last `AUTO_INCREMENT` or `AUTO_RANDOM` value generated by an insert statement.
- The value of `last_insert_id` is the same as the value returned by the function `LAST_INSERT_ID()`.

### last_plan_from_binding <span class="version-mark">New in v4.0</span>

- Scope: SESSION
Expand Down

0 comments on commit b442c1b

Please sign in to comment.