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

android - Invite new users for my app using app notifications facebook -

Need help in packaging app using TideSDK on Windows -

html - CSS: Combine Texture and Color -