Welcome to WebmasterWorld Guest from 54.196.232.162

Forum Moderators: open

Message Too Old, No Replies

MySQL: Primar y key, index, unique

what is what?

     
11:52 am on Mar 19, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Nov 7, 2007
posts: 46
votes: 0


In MySQL - what is a "primary keys"?

Is it one column in a table?
Can it be more than one column?
Is it the same as an Index?
Does a table HAVE to have a primary key?

9:04 am on Mar 24, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 27, 2005
posts: 181
votes: 0


Is it one column in a table?

It can be one or more.

Is it the same as an Index?

No, a primary key uniquely identifies each individual row in a table. An index improves the speed of operations on a table, it can also be on one or more columns.

Does a table HAVE to have a primary key?

No, but it is good practice IMHO.

Cheers,
badone

9:20 am on Mar 24, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Nov 7, 2007
posts:46
votes: 0


Thanks for posting, bad one - and thanks for your straight answers. Kudos.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members