Foreign key constraint is incorrectly formed
CREATE TABLE Usuario(
Idusuario INTEGER PRIMARY KEY AUTO_INCREMENT,
Idrol int NOT NULL,
Nombre VARCHAR(100) NOT NULL,
TipoDoc VARCHAR(20) NULL,
NumDoc VARCHAR(20) NULL,
Direccion VARCHAR(70) NULL,
Telefono VARCHAR(20) NULL,
Email VARCHAR(50) NOT NULL,
Password_Hash TINYBLOB NOT NULL,
Password_Salt TINYBLOB NOT NULL,
Condicion TINYINT DEFAULT(1),
FOREIGN KEY (Idrol) REFERENCES Role (Idrol)
);
send me this error. the table Role exist and is int (11). any help please
Subject
Written By
Posted
Foreign key constraint is incorrectly formed
November 30, 2021 08:40AM
November 30, 2021 10:31AM
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.