eduard Posted April 3, 2011 Share Posted April 3, 2011 Who can explain to me please: Primary Keys and Auto increment fields? Link to comment Share on other sites More sharing options...
birbal Posted April 3, 2011 Share Posted April 3, 2011 primary keys are used to idenitify a column. primary keys are unique so it cant have any duplicate value.if you set a column as auto increment it will increase the number by 1 every time you will insert a new row. Link to comment Share on other sites More sharing options...
eduard Posted April 3, 2011 Author Share Posted April 3, 2011 primary keys are used to idenitify a column. primary keys are unique so it cant have any duplicate value.if you set a column as auto increment it will increase the number by 1 every time you will insert a new row.Sorry, I don´t understand ´primary keys´! Can you give an example please? Link to comment Share on other sites More sharing options...
birbal Posted April 3, 2011 Share Posted April 3, 2011 suppose you are making a user table. there is three field userid,name,agenow name can be same for many entries so it would be difficult to identify any particular user. so you need to a column which is unique for every entries. so to achieve this you can use primary key constrain to the userid column. Link to comment Share on other sites More sharing options...
eduard Posted April 3, 2011 Author Share Posted April 3, 2011 suppose you are making a user table. there is three field userid,name,agenow name can be same for many entries so it would be difficult to identify any particular user. so you need to a column which is unique for every entries. so to achieve this you can use primary key constrain to the userid column.Ok, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.