Re: select based on multi-column primary keys
От
Andrew Sullivan
Тема
Re: select based on multi-column primary keys
Дата
Msg-id
20070121152838.GB3533@phlogiston.dyndns.org
Ответ на
Re: select based on multi-column primary keys (codeWarrior)
Список
Дерево обсуждения
Re: select based on multi-column primary keys "codeWarrior" <gpatnude@hotmail.com>
Re: select based on multi-column primary keys Andrew Sullivan <ajs@crankycanuck.ca>
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
В списке pgsql-sql по дате отправления
От: Ezequias Rodrigues da Rocha
Дата: