mysql中設置某個表中的某個字段爲遞增主鍵

alter   table   tablename modify   filedname  int(11)   auto_increment ,add primary key (filedname);

tablename替換爲表名 ,filedname替換爲想要設置遞增主鍵的字段名,11替換爲數據長度

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章