34,333
edits
Changes
→AUTO_INCREMENT
It is possible to override the AUTO_INCREMENT value of a column simply by specifying a value when executing an INSERT statement. As long as the specified value to unique the value provided will be used in the new row and subsequent increments will start at the newly inserted value.
MySQL may be interrogated to retrieve the most recent increment value using the ''last_insert_id()'' function as follows:
<pre>
SELECT last_insert_value();
</pre>
== Defining Default Values During Table Creation ==