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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -