I have a table named employee which has three columns empid (which is int), empname (varchar) and salary(int). I have already made the table and inserted some data as well. Now I want to make empid autoincrement.
I used the command:
ALTER TABLE employee ADD AUTO_INCREMENT(empid);
But I get the following error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(empid)' at line 1
 
     
    