RE: Q: PRIMARY KEY vs UNIQUE constraint
Posted in 1996
The primary key attribute is needed if other tables will be using foreign keys to refer to it. You're right, if you're just looking at one table, then unique keys and primary keys seems to be the same. It's when you look at multiple tables and are trying to enforce referential constraints that the difference appears. --Craig (craig@chemistry.utah.edu) } }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). }