Jump to content
Killersites Forums

MySQL primary, unique, and index keys


JLongo3925
 Share

Recommended Posts

  • 2 weeks later...
What is the difference between Primary, Unique, and Index keys? When would I want to use each one? What are the advantages of using one over another?

 

Primary key - This is the primary way to identify a Record in a table. Primary keys are UNIQUE

 

Unique key - duh, a Key that is unique. It lets you enforce uniqueness on a field(s) other then primary key.

 

Index key - index keys are help queries execute more efficiently when used in where clause

 

BAHHHH - just go here for a better explanation: http://www.geekgirls.com/database_dictionary.htm

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...