MySQL supports a unique incrementing number for a single database column using the AUTO_INCREMENT definition when specified with CREATE TABLE statement. This is a common use for a Primary Key. This implementation has some similar traits with a database sequence that is found in other RDBMS products.
You can determine the last value used for an AUTO_INCREMENT column using the LAST_INSERT_ID() function.
Only one table column can be defined as an AUTO_INCREMENT column and this column must be part of the table Primary Key.