Tuesday, 1 October 2013

ORA-02270: no matching unique or primary key for this column-list i don't know why

ORA-02270: no matching unique or primary key for this column-list i don't
know why

i tried to create a table with a foreign key to another one but i dont
know why this error keeps poping up every time i try, please help me
CREATE TABLE usuarios( username VARCHAR2(100), cedula VARCHAR2(100),
ultimoAcceso DATE, CONSTRAINT Pk PRIMARY KEY (cedula,username) ) ;
CREATE TABLE pagoPlanillas( ced VARCHAR2(100), fecha DATE, detalle
VARCHAR2(100), salario VARCHAR2(100), CONSTRAINT FK1 FOREIGN KEY(ced)
REFERENCES usuarios(cedula) ) ;

No comments:

Post a Comment