On Fri, Jan 19, 2007 at 07:45:40PM -0800, codeWarrior wrote:
> AFAIK: You cannot have multiple primary keys. How would you know which one
> is the actual key ?
You can have a multi-column primary key, though. That's a perfectly
legitimate approach.
> FYI: What you are really talking about are table contraints... When you have
No, it's a multi-column primary key.
> My advice would be to alter your table structure so that you have a "real"
> PK not table constraints -- that would make it searchable....
This is already searchable. What you are talking about is not a real
primary key, but an artificial one. The OP already has a real
primary key. SQL purists think artificial primary keys mean that you
haven't done enough normalisation. I'm going to remain silent on
that topic, though, so that we don't get a Thread That Does Not End
:)
A
--
Andrew Sullivan | ajs@crankycanuck.ca
If they don't do anything, we don't need their acronym. --Josh Hamilton, on the US FEMA