ALTER TABLE tbl1 ADD id INT PRIMARY KEY AUTO_INCREMENT FIRST;
参考:Insert auto increment primary key to existing tablesql