數據庫導入數據后發現沒有自增 id,因此就有了上面這個問題。
解決方法
1、給某一張表先增加一個字段,這里我們就以 node_table 這張表來舉例,在數據庫命令行輸入下面指令 :
alter table node_table add id int
- 1
2、更改 id 字段屬性為自增屬性,在數據庫命令行輸入下面指令 :
alter table `node_table` change id id int not null auto_increment primary key;
https://blog.csdn.net/weixin_41287692/article/details/86138133