--Boundary_(ID_VZAyTmEAzstZRjxlJFEPjQ)
Content-type: text/plain; charset=us-ascii
Content-disposition: inline
Content-transfer-encoding: 7BIT
Martin
A PK *will* be unique, so declaring a PK will do it. The only problem in
declaring PK with a CREATE TABLE or ALTER TABLE is that Informix generates the
underlying unique index for you and this has a system defined name. The name is
such that you cant use a DROP INDEX to drop this index - the only way to get rid
of it would be drop the PK. So what I usually did for such cases was to create
the unique index first, then create the PK for documentation purposes.
Just my $ 0.02
Sujit
"Martin A. Marques" <martin@math.unl.edu.ar> on 06/24/2000 05:32:24 AM
To: Obnoxio The Clown <obnoxio@hotmail.com>, martin@math.unl.edu.ar,
informix-list@iiug.org
cc:
Subject: Re: primary key and uniqueness
--Boundary_(ID_VZAyTmEAzstZRjxlJFEPjQ)
Content-type: text/plain; charset=iso-8859-1
Content-disposition: inline
Content-transfer-encoding: quoted-printable
On Sat, 24 Jun 2000, Obnoxio The Clown wrote:
> From: "Martin A. Marques" <martin@math.unl.edu.ar>
> >So with PRIMARY KEY I get it all! Do I get some other constraint?
>
> In what way?
I mean, if the colum is declared as a PRIMARY KEY, then it will be UNIQ=
UE too?
> >One last one. Is it posible to reference a field on a table to a fie=
ld on
> >another table that is not a PRIMARY KEY?
>
> No. Not using declarative syntax, anyway.
What do you mean with declarative syntax? If you respond RTFM, at least=
tell
me what FM. ;-)
Thanks, and I got the tables created just as I wanted. :-)
--
"And I'm happy, because you make me feel good, about me." - Melvin Udal=
l
-----------------------------------------------------------------
Mart=EDn Marqu=E9s email: martin@math.unl.edu.ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------
=
--Boundary_(ID_VZAyTmEAzstZRjxlJFEPjQ)--