RE: unique values across more than one column

2004-03-01 Thread Colin Williams
Hi, Could you just break out the email information into its own table? Then you could have columns like the following: UserID (foreign key), email (varchar), type (int: 1=primary email, 2=alias email). Then you can just have the email column defined as a unique index and relate the email to the

Re: unique values across more than one column

2004-02-27 Thread Michael Stassen
Anand Buddhdev wrote: On Fri, Feb 27, 2004 at 12:58:14PM +0200, Egor Egorov wrote: I'm using mysql version 3.23.58, on Fedora core 1 (the default supplied on the system). I have searched the mailing list archives, and google, for my query, but have not yet found an answer. Does anyone know if it

Re: unique values across more than one column

2004-02-27 Thread Anand Buddhdev
On Fri, Feb 27, 2004 at 01:54:13PM +0200, Egor Egorov wrote: > > Ok, thanks for the response. > > > > The problem with first doing a select, and then an insert, is that > > there exists a race condition. Between the select and insert, someone > > else could insert a row which might cause a duplic

Re: unique values across more than one column

2004-02-27 Thread Alec . Cawley
Anand Buddhdev <[EMAIL PROTECTED]> wrote on 27/02/2004 11:26:41: > The problem with first doing a select, and then an insert, is that > there exists a race condition. Between the select and insert, someone > else could insert a row which might cause a duplication. > > I have another soluti

Re: unique values across more than one column

2004-02-27 Thread Egor Egorov
Anand Buddhdev <[EMAIL PROTECTED]> wrote: > On Fri, Feb 27, 2004 at 12:58:14PM +0200, Egor Egorov wrote: > >> > I'm using mysql version 3.23.58, on Fedora core 1 (the default >> > supplied on the system). >> > >> > I have searched the mailing list archives, and google, for my query, >> > but have

Re: unique values across more than one column

2004-02-27 Thread Anand Buddhdev
On Fri, Feb 27, 2004 at 12:58:14PM +0200, Egor Egorov wrote: > > I'm using mysql version 3.23.58, on Fedora core 1 (the default > > supplied on the system). > > > > I have searched the mailing list archives, and google, for my query, > > but have not yet found an answer. > > > > Does anyone know

Re: unique values across more than one column

2004-02-27 Thread Egor Egorov
Anand Buddhdev <[EMAIL PROTECTED]> wrote: > > I'm using mysql version 3.23.58, on Fedora core 1 (the default > supplied on the system). > > I have searched the mailing list archives, and google, for my query, > but have not yet found an answer. > > Does anyone know if it's possible to define 2 c