Subject Re: PK question
Author alex_vnru
--- In ib-support@y..., Didier Gasser-Morlay <Didiergm@n...> wrote:
> Now my question: I am trying to create a primary key with three
fields :
> FieldA, FieldB and FieldC. The three fields are not null obviously.
In
> my mind, the uniqueness is evaluated by combining the three fields
> values and the result must be unique. It seems though that as soon
as
> fieldA has got the same value in more than one record, then the PK
> creation is rejected.

Didier, it is absolutly legal operation and I regularly perform
ones. While you don't report statement you use to create PK and exact
error message, I can suppose
1) Typo or other syntax error in statement
2) Name of constraint you try to create already used for another
constraint
3) You data contains duplicates of all 3 columns and you don't noticed
it
4) Very-very little possibility: database is corrupted and somewhere
is record containing NULL in all columns. Such a records can't be seen
using query which use indexes, by natural scan only and sometimes only
after gfix -mend.

Best regards, Alexander V.Nevsky.