sql - How to I add unique id's to mysql table? -
i have big mysql database. there 800000 records. there no uids have. how can add uids automaticly?
alter table `your_table_name` add `uid` int not null auto_increment primary key first;
be patient after executing statement.
edit:
alter table `your_table_name` auto_increment = 300000;
Comments
Post a Comment