MySQL Forums
Forum List  »  MySQL Workbench

ERROR 1022: Can't write; duplicate key in table 'goesto'
Posted by: estefania rabadan
Date: April 08, 2013 09:00AM

Hi all, i'm getting "Can't write; duplicate key in table" on this SQL statement:

CREATE TABLE `hamneggs`.`goesto` (
`usr_id` INT NOT NULL ,
`spr_id` INT NOT NULL ,
PRIMARY KEY (`usr_id`, `spr_id`) ,
INDEX `usr_id_idx` (`usr_id` ASC) ,
INDEX `spr_id_idx` (`spr_id` ASC) ,
CONSTRAINT `usr_id`
FOREIGN KEY (`usr_id` )
REFERENCES `hamneggs`.`users` (`usr_id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `spr_id`
FOREIGN KEY (`spr_id` )
REFERENCES `hamneggs`.`sprints` (`spr_id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION);

it's the representation of a N:N relationship between users and meetings, what can be the problem?

thank you!!

Options: ReplyQuote


Subject
Views
Written By
Posted
ERROR 1022: Can't write; duplicate key in table 'goesto'
3182
April 08, 2013 09:00AM


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.