title: Duplicate key error in MySQL
body: <p>The below query is resulting in an error. I created this query in MySQL Workbench</p>
  
  <pre><code>Error
  
  SQL query:
  
  -- -----------------------------------------------------
  -- Table `smsdb`.`IntSupervisor`
  -- -----------------------------------------------------
    CREATE TABLE IF NOT EXISTS `smsdb`.`IntSupervisor` (
     `int_supr_id` VARCHAR( 32 ) NOT NULL ,
     `cent_id` INT NOT NULL ,
     INDEX `fk_IntSupervisor_Person1_idx` ( `int_supr_id` ASC ) ,
     INDEX `fk_IntSupervisor_Center1_idx` ( `cent_id` ASC ) ,
     PRIMARY KEY ( `int_supr_id` ) ,
     CONSTRAINT `fk_parent_id` FOREIGN KEY ( `int_supr_id` ) 
     REFERENCES `smsdb`.`Staff` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ,
     CONSTRAINT `fk_center_id` FOREIGN KEY ( `cent_id` )
     REFERENCES  `smsdb`.`Center` (`cent_id`
   ) ON DELETE CASCADE ON UPDATE RESTRICT
   ) ENGINE = InnoDB;
  </code></pre>
  
  <p>I got an error message on execution:</p>
  
  <pre><code>MySQL said: Documentation  
      #1022 - Can't write; duplicate key in table 'intsupervisor'
  </code></pre>
  
  <p>If anyone has any ideas on how I can resolve this issue, please guide me in the right direction. Thanks!</p>