MySQL Forums
Forum List  »  Newbie

Create primary Key
Posted by: Olivier Goossens Bara
Date: April 30, 2005 01:44AM

Hello I use ddldump to extract a table definition, then I use the create syntax to create a new table in another Database but the primary key definition gives an error message, what is wrong ?
Why the syntax extracted from an existing table does not work ?
If I remove the the two instruction to create primary field and key, it works.

Thanks for any help

CREATE TABLE IF NOT EXISTS are (
DsetId bigint(10) default NULL,
SecId bigint(10) default NULL,
AreItmId bigint(10) default NULL,
LayerId int(2) default NULL,
FeatClass int(4) default NULL,
SplitInd char(1) default NULL,
NrFaces bigint(10) default NULL,
NrAttSets int(10) default NULL,
DummyFeat char(1) default NULL,
primary int(10) NOT NULL auto_increment,
PRIMARY KEY (primary),
KEY Area (AreItmId),
KEY Feat (FeatClass)
) TYPE=MyISAM;

Options: ReplyQuote


Subject
Written By
Posted
Create primary Key
April 30, 2005 01:44AM
April 30, 2005 05:48AM
May 02, 2005 06:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.