Duplicate values in column that is foreign key

0

When trying to insert a new data into a given table (official), I have a column named "managerID" which is FK of the "official" table itself.

During the registration I send the ID of another employee in this column, only it is returning that already I have the value registered in the column. And I have in fact, but it is not to occur this. I have a column that performs the same function called "companyID" which is FK too, but another table, but the problem of duplicate values does not occur.

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10' for key 'gerenteID'
    
asked by anonymous 28.01.2018 / 23:08

0 answers