vs mdk vs mdk - 4 months ago 14
MySQL Question

Mysql table with more than one Auto-Incremented column

I have a table with the following structure:

id | number | text
1 | 1 | test

in which, id is my primary key with auto increment value. I want to make number as auto increment value too. Is it possible to have more than one auto increment column in one table?


It is not possible.There can be only one auto-increment column and it must be defined as a key in MySQL. But You can do it by using trigger for detail go this link CREATE TRIGGER