• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple primary key exception

 
niya nair
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai all
i am getting an exception like
MySQLSyntaxErrorException multiple primary key defined.
my query is

CREATE TABLE `first_item` (
`itemid` int(5) unsigned NOT NULL default '0',
`subitemid` int(5) unsigned NOT NULL default '0',
PRIMARY KEY (`itemid`,`subitemid`)
)
i am using innodb as the database engine.
can someone give me any suggestion please.

thanks
[ November 19, 2007: Message edited by: niya nair ]
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your CREATE TABLE statement does execute in MySQL, and it creates a table.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic