How can I add an AUTO_INCREMENT to an already existing table?
Have tried altring the table and adding auto_increment(customer_id) but giving error.
1 answers ( 0 marked as helpful)
Hi Namnso!
Thanks for reaching out!
Can you please provide a screenshot of the error you're encountering?
Please note that to add an AUTO_INCREMENT
attribute to a column, the column must be defined as a key. So, if that's not specified, you'll get an error.
Best,
Ivan