From: SGreen Date: September 26 2005 6:12pm Subject: Re: INDEX List-Archive: http://lists.mysql.com/mysql/189571 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_alternative 0063B1F085257088_=" --=_alternative 0063B1F085257088_= Content-Type: text/plain; charset="US-ASCII" Scott Hamm wrote on 09/26/2005 01:59:52 PM: > How do I set Index to enforce that ONLY 1 QAID can own that order number, > but nothing else? > > For example: > > QAID [order] ErrorType > 11223 123456789 19 'ALLOWED TO HAVE different ErrorTypes as long as one QAID > number uses it. > 11223 123456789 19 'VIOLATED cannot have same ErrorTypes -> UNIQUE INDEX > (QAID,[order],ErrorType) > 11223 123456789 15 > 11223 123456789 NULL > > 11240 123456789 14 'VIOLATED -- order was owned by QAID 11223, therefore can > not used by different QAID > Please post the output from SHOW CREATE TABLE. That way I can see not only what your columns are actually called, I can also see what other keys have been defined on the table. Shawn Green Database Administrator Unimin Corporation - Spruce Pine --=_alternative 0063B1F085257088_=--