Answered my own question.  For posterity:

"alter table abc add unique(foo, bar);"

And the index will be created using the name of the first column you
specify.  Works like a charm!

--Noel

----- Original Message -----
From: "Noel Wade" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 01, 2003 12:04 AM
Subject: Quick "unique" question...


I know its possible to use multiple fields for the primary key in a table
i.e. "primary key(foo,bar)"

Is it possible to do this with "unique" identifiers as well?  Like "unique
key(foo,bar)" ??

I already have a primary key on a table, but I'd also like to force two
fields to form a unique combination (no two records should have the same foo
& bar values).

Thanks!

--Noel




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

Reply via email to