+ 3
Another way to change constraints
I've created a table using the following statements: > create table users (user_id int); After a while, I've wanted to change 'user_id' to 'auto_increment', but the following statements does't work: > alter table users change user_id int not null auto_increment; Then, I figured out another way to change this: > alter table users modify user_id int not null auto_increment; And the magic happened!
2 Answers
+ 3
Nice tip!
0
thanks!