0
I put these commands to create the table;
CREATE TABLE pessoa (
codigo BIGINT(20) PRIMARY KEY AUTO_INCREMENT,
nome VARCHAR(80) NOT NULL,
codigo_condominio BIGINT(20) NOT NULL,
codigo_proprietario BIGINT(20) NOT NULL,
tipoPessoa VARCHAR(80) NOT NULL,
FOREIGN KEY (codigo_condominio) REFERENCES condominio (codigo),
FOREIGN KEY (codigo_proprietario) REFERENCES proprietario (codigo)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
but it is generating me this mistake
ERROR 1215 (HY000): Cannot add Foreign key Constraint
what will be the problem?
Before creating this table, you created the condominium and owner?
– rray