aspose file tools
The moose likes JDBC and the fly likes multiple primary key exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "multiple primary key exception" Watch "multiple primary key exception" New topic
Author

multiple primary key exception

niya nair
Greenhorn

Joined: Sep 19, 2007
Posts: 11
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

Joined: Dec 11, 2006
Posts: 364
Your CREATE TABLE statement does execute in MySQL, and it creates a table.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: multiple primary key exception
 
Similar Threads
setBoolean - not working properly
Mysql query
how set "default" inthe name of column ?
problem in creating table with FULLTEXT KEY index
Three problems with mysql...