+ 3
What difference between PRIMARY KEY and AUTO_INCREMENT PRIMARY KEY ?
full difference please
3 Respuestas
+ 2
which field defined as primary key in a table, that field never contents duplicate value. Not even null value.It may AUTO_INCREMENT or not.
And AUTO_INCREMENT keyword also never insert duplicate values but the main thing is this field value is increasing automatically +1, when new row inserted.No need to input value by user.
+ 1
auto_increment is for adding +1 on every primary key record ex: my first record of column name is Jonh,the id Will be automaticaly 1, and for thé next record,for exemple Mike,the primary key column will be 1+1= 2,for thé next recirdy,3,4,...
0
so primary key can be 1,2,4,5,6 but autoincrement primary key can be only as - 1,2,3,4,5,6 ?