Re: Q: PRIMARY KEY vs UNIQUE constraint
Posted in 1996
bmiller (bmiller@neonramp.com) wrote: : What is the benefit in defining the structure of a table as a PRIMARY-KEY vs : a UNIQUE constraint in an Informix database? In other words, (I have looked : in the manuals but could not find anything), how does Informix treat the : PRIMARY-KEY differently than a UNIQUE constraint? They both use a unique : index and seem to be different only in the table sysconstraint's constraint : type (I forget the column name). Basically, defining a primary key constraint creates a unique index, and creates an entry in sysconstriants. The latter is important if you plan on connecting to NewEra, since some of the SuperTable features read sysconstraints to determine PK, joins between tables, etc. In short, using constraints is the new way, and it's probably a good idea to adopt the new way. ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Principal Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.