ALTER TABLE tablename ADD UNIQUE (Column1, Column2);

Best Regards,
Andrew


> Can someone explain how I can make a combination of two fields be a
> unique index.
>
> For example, in my table I have an OrderID field and a LineItems field.
> Individually the fields are not unique but when combined they are. I'd
> like to create a unique index of the two together but not individually.
>
> Thanks for the help.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to