| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | September 25 1999 3:59pm |
| Subject: | Re: Multiple Primary Keys | ||
| View as plain text | |||
At 9:56 AM -0500 9/25/99, Yuval Malchi wrote: >Hi, > >I have two tables with a many to many relationship and >they need an associative table which uses the primary >keys from both tables. Mysql tells me that "multiple >primary keys defined". Is this not possible to do in >Mysql? How do I get around it? Use two UNIQUE indexes. A table can have only one PRIMARY KEY, but multiple UNIQUE indexes. But perhaps what you really want is a two-column PRIMARY KEY, given your description. It's somewhat ususual to have multiple unique indexes on a table. -- Paul DuBois, paul@stripped
| Thread | ||
|---|---|---|
| • Multiple Primary Keys | Yuval Malchi | 25 Sep |
| • Re: Multiple Primary Keys | Paul DuBois | 25 Sep |
| • Re: Multiple Primary Keys | Bob Kline | 25 Sep |
| • Re: Multiple Primary Keys | Yuval Malchi | 25 Sep |
| • Re: Multiple Primary Keys | Paul DuBois | 25 Sep |
| • Re: Multiple Primary Keys | Paul DuBois | 25 Sep |
| • RE: Multiple Primary Keys | bkline | 25 Sep |
| • RE: Multiple Primary Keys | Otis Gospodnetic | 25 Sep |
| • RE: Multiple Primary Keys | Bob Kline | 25 Sep |
| • Re: Multiple Primary Keys | Yuval Malchi | 25 Sep |
| • RE: Multiple Primary Keys | Yuval Malchi | 25 Sep |
| • RE: Multiple Primary Keys | Bob Kline | 25 Sep |
| • Re: Multiple Primary Keys | Martin Ramsch | 25 Sep |
