This is a short guide that will teach you how you can auto-increment a field in a mysql table. What auto-increment does is to fill up a value for a field without user intervention. It automatically generates auto-incrementing values as you use an insert query. Auto-increment values are usually used as a primary key or unique key for a certain table in a database.
Here’s a screenshot that will give you an idea on how to auto-increment a field.
The value that would be inserted in this field would be 1 to n. Where n is the numeric value of the last record that you have inserted in the table.
When you perform an insert query, you don’t need to supply values on these fields. That’s very useful because the amount of time needed to complete a form is diminished because a unique number for the primary key is automatically generated.