Re: constraining unique values across columns

2006-05-01 Thread Shawn Green
sorry :( I clicked "send" too early --- Shawn Green <[EMAIL PROTECTED]> wrote: > > > --- Scott Purcell <[EMAIL PROTECTED]> wrote: > > > I occasionally run into issues where I would like to ensure that > the > > values across two or three columns are not duplicated. At work we > use > > Oracle

Re: constraining unique values across columns

2006-05-01 Thread Shawn Green
--- Scott Purcell <[EMAIL PROTECTED]> wrote: > I occasionally run into issues where I would like to ensure that the > values across two or three columns are not duplicated. At work we use > Oracle, and I see that they add constraints when creating the > columns. I > am running mysql 5.0 and was

RE: constraining unique values across columns

2006-05-01 Thread Tim Lucia
How about this? CREATE TABLE `test`.`test` ( `x` INTEGER UNSIGNED NOT NULL DEFAULT 0, `y` INTEGER UNSIGNED NOT NULL DEFAULT 0, `Z` INTEGER UNSIGNED NOT NULL DEFAULT 0, UNIQUE `Index_1`(`x`, `y`, `Z`) ) ENGINE = InnoDB; Tim -Original Message- From: Scott Purcell [mailto:[EMAIL PR