0
Altering table and adding data
I have altered an existing table but when i try inserting values into the new columns by stating Insert into Wantslist (years,months) values ('2016','05'); it's saying that the primary key does not have default value. am i using wrong code for insertion of data in new altered columns ? really need help :(
2 Answers
+ 2
When you altered the table did you make one of the other columns the primary key.
You also need to ensure the primary key is set to NOTNULL and AUTO_INCREMENT.
+ 1
please type your entire code here so that it's easier for us to see where the problem could have been