Ron St-Pierre <rstpierre(at)syscor(dot)com> writes:
> Greg Stark wrote:
>
> >Try just
> >
> >create unique index on compass (company) where ysndefault
You might also want
create unique index on compass (company,association)
If a company isn't supposed to have duplicate associations at all. This would
also prevent having a default and non-default relationship to the same
association.
--
greg