Subject | Re: [ib-support] PK question |
---|---|
Author | Paul Reeves |
Post date | 2002-03-12T17:44:28Z |
Didier Gasser-Morlay wrote:
rejected or the insert statement rejected?
(implicitly unique) or not. Whether you choose to have a surrogate key
on a single field and a unique index on another set of fields or a
primary key on those same fields shouldn't make any difference.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
>What do you mean by 'the PK creation is rejected'? Is the DDL statement
> 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.
>
rejected or the insert statement rejected?
> I know this is not the right thing to do (I should have a small PK, withUnique indexes are the way to go - whether they are called primary keys
> only one field), but this is a very small table & I need to check the
> uniqueness of three fields out of four.
(implicitly unique) or not. Whether you choose to have a surrogate key
on a single field and a unique index on another set of fields or a
primary key on those same fields shouldn't make any difference.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further