Jump to content

Primary keys and Auto increment fields?


eduard

Recommended Posts

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...