Jump to content


Photo

Unique and Index as constraints?


  • Please log in to reply
1 reply to this topic

#1 extrovertive

extrovertive
  • Members
  • PipPipPip
  • Advanced Member
  • 235 posts

Posted 13 August 2006 - 09:49 PM

I use primary key for to identitfy unique entry in the database.

Under what circumstances, should I use "unique" and "index"?

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 14 August 2006 - 05:27 AM

Primary keys are always unique... use index if you can have duplicates.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users