List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 26 2003 8:27pm
Subject:Re: Multiple Primary key
View as plain text  
At 20:50 +0100 11/26/03, getting_out wrote:
>Good evening people.
>I'm trying to create a simple table via MySQl Navigator.
>The table il structured in this way
>dt_amt	Date		Not Null	Primary Key
>oper	INT		Not Null	Primary Key
>amount	Decimal(3,3)	Null		---
>but when I choose "fire" it shows me a "multiple primary key defined"
>message and doesn't make me create the table.
>Isn't MySql able to handle multiple primary key or it's a navigator bug?

You cannot define multiple primary keys using PRIMARY KEY.  The name of
a PRIMARY KEY is PRIMARY, and you'd end up with two indexes having the
same name.

To work around this, use a UNIQUE index instead for one of them.

>In the same day I can receive data from different operators.
>Thanks in advance D.

Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA

Are you MySQL certified?

Multiple Primary keygetting_out26 Nov
  • Re: Multiple Primary keyUnknown Sender26 Nov
    • Re: Multiple Primary keygetting_out26 Nov
  • Re: Multiple Primary keyPaul DuBois26 Nov
  • Re: Multiple Primary keyMartijn Tonies27 Nov