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. And of course, PRIMARY KEY implies NOT NULL. -- Cheers, Billy. ----------------------------------------------------------------------------- billy.wheeler@pixie.co.za +27 11 803 2151 p.o. box 3463, rivonia, rsa, 2128 +27 83 250 2324 informix developer at large (and i mean _large_) -----------------------------------------------------------------------------