hi friends

i hava two primary key in single table no auto incriment.when i insert the value in jsp i getting like this error.

com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate
entry '0-3' for key 1

There can be only one primary key per table! However you can have multiple foreign keys...

Maybe the OP means Composite key ..


You are trying to insert data (PK) which already exists in your table .. this is why you are getting this error ..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.