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