le007 Posted October 15, 2007 Share Posted October 15, 2007 As subject really! Link to comment https://forums.phpfreaks.com/topic/73321-solved-what-are-primary-keys-for-why-do-i-need-to-specify-them/ Share on other sites More sharing options...
BlueSkyIS Posted October 15, 2007 Share Posted October 15, 2007 database question. here is some info: http://www.danchan.com/feature/2000/10/16/mysql/mysql2.htm Link to comment https://forums.phpfreaks.com/topic/73321-solved-what-are-primary-keys-for-why-do-i-need-to-specify-them/#findComment-369931 Share on other sites More sharing options...
le007 Posted October 15, 2007 Author Share Posted October 15, 2007 Thanks - am just looking for a direct answer tho? Easy to understand answer! Link to comment https://forums.phpfreaks.com/topic/73321-solved-what-are-primary-keys-for-why-do-i-need-to-specify-them/#findComment-369935 Share on other sites More sharing options...
BlueSkyIS Posted October 15, 2007 Share Posted October 15, 2007 okay. primary key ensures that every record is unique and it also provides an index for searches. i typically include an INTEGER field called ID on all of my tables. I set that field to primary key, auto-incrementing, then it automatically populates as each record is entered. When I get a record, i identify it by it's primary key. Link to comment https://forums.phpfreaks.com/topic/73321-solved-what-are-primary-keys-for-why-do-i-need-to-specify-them/#findComment-369937 Share on other sites More sharing options...
le007 Posted October 15, 2007 Author Share Posted October 15, 2007 Thanks fella, cheers Link to comment https://forums.phpfreaks.com/topic/73321-solved-what-are-primary-keys-for-why-do-i-need-to-specify-them/#findComment-369938 Share on other sites More sharing options...
hamza Posted October 15, 2007 Share Posted October 15, 2007 Primary key is basically used to uniqueally identiy each field of the table and is also used to create the forgion key. Without PK you can not create the foregion key .(okey) And its a basic key in every database programming. we have more other keys liek Composite primary key Foregion key and some others -=-------------------- Link to comment https://forums.phpfreaks.com/topic/73321-solved-what-are-primary-keys-for-why-do-i-need-to-specify-them/#findComment-370104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.