mysql - error getting while start a value from 0 in auto increment -
hi have field uid in mysql db when created table used add uid int primary key auto_increment value started 1.so deleted field , created time out using primary key or auto_increment.then inserted 0 , when want make primary , auto increment not working.please tell me how do
alter table patient add primary key(uid); error 1062 (23000): duplicate entry '0' key 'primary'
you cannot make field primary key (or unique) if holds duplicated values. check records , there no repeated uid values.