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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -