daver1982 Posted September 2, 2009 Share Posted September 2, 2009 hi this is a mysql question for version 5.1 . im working through a book and i am trying to add a auto_increment column id to an already existing table called "classics". here is the command i am given to enter: ALTER TABLE classics ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT KEY; the response i get is: Error 1064(42000): you have an error in your SQL syntax; check the manual thatcorresponds to your MySQLserver version for the right syntax to use near 'UNASIGNED NOT NULL AUTO_INCREMENT KEY' at line 1. i have looked to see if i have to alter the syntax at all and connot find it. I also tried deleting and using CREATE to make them all at the same time but come up with a similar result. if anyone can shed any light on how i need to alter my commands for the version i have i would be very grateful many thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/172794-alter-table-error/ Share on other sites More sharing options...
fenway Posted September 7, 2009 Share Posted September 7, 2009 You'll notice that the error doesn't match the posted statement. Quote Link to comment https://forums.phpfreaks.com/topic/172794-alter-table-error/#findComment-914150 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.