RE: Unique constraint
Posted in 1999
There is a very distinct advantage: REFERENTIAL INTEGRITY. If you have a UNIQUE INDEX on a column or group of columns, you CANNOT have a foreign key constraint from another table referencing those columns. If you use a UNIQUE CONSTRAINT, a unique index is created, and you CAN have a foreign key constraint from another table referencing those columns. HTH > -----Original Message----- > From: Luse Harold [SMTP:hluse@vth.colostate.edu] > Sent: Thursday, September 16, 1999 2:46 PM > To: informix_list > Subject: Unique constraint > > Is there any advantage to putting a unique constraint on a column instead > of creating a unique index on a column? I have seen this done, and I > don't see any advantage. The column is being used in a join anyway, so it > would seem that a unique index would be the way to go. > > Comments anyone? > > ==================================================================== > Harold Luse Phone: (970) 491-4120 > Veterinary Teaching Hospital Fax: (970) 491-4123 > Colorado State University Pager: (970) 229-8173 > Fort Collins, Colorado USA E-mail: hluse@vth.colostate.edu > ====================================================================