From: Martijn Tonies Date: November 27 2003 7:13am Subject: Re: Multiple Primary key List-Archive: http://lists.mysql.com/mysql/154616 Message-Id: <001301c3b4b6$016af460$0e02a8c0@martijn> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, > 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? > In the same day I can receive data from different operators. It depends on what you want - Do you want a compound primary key? If so, use the PRIMARY KEY (col1, col2, coln) clause. If you want multiple primary keys: no can do, only 1 primary key per table can be defined. If you want to enforce uniqueness in more than one column, use additional UNIQUE constraints/indices. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com