How to set initial value and auto increment in MySQL?

in #student7 years ago (edited)

It is convenient to let the database to manage id, such as order IDs that can be generated automatically each time we insert a new order tuple into the order table. Moreover, we might want to set an initial value for the IDs so that it will not start from 0 as the first customer does not like to see a "000000" order.

Source: https://stackoverflow.com/questions/1485668/how-to-set-initial-value-and-auto-increment-in-mysql