Created
November 28, 2010 13:41
-
-
Save alexzhan/718940 to your computer and use it in GitHub Desktop.
add auto_increment id set primary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
对于item_detail: | |
先用 | |
alter table item_detail drop primary key; | |
删除原来的主键; | |
然后用: | |
alter table item_detail add column id int unsigned not null auto_increment primary key; | |
增加自增的主键id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment