0

im trying to do this :

alter table project_info change column number proj_id int not null auto_increment,
add primary key (proj_id);

but mysql tells iv got an error. any help with whats wrong here ? i followed this from head first sql book (page 210 if anyone's interested ) .

2
Contributors
2
Replies
12
Views
4 Years
Discussion Span
Last Post by somjit{}
0

modify is for changing the type only right ? im trying to change the name and the type together...

this place shows that the keyword column is not needed as iv done above , but that also is giving errors.

edit:

alter table project_info change number proj_id int not null auto_increment,
add primary key (proj_id);

this seems to get the job done .
thanks for helping :)

Edited by somjit{}

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.