The situation is that I have a table called OS and I want to create a link from this OS table to the CLIENT, using the CPF column as FK. Where am I going wrong?
I am editing the direct database of Netbeans data. The client table has already been created and has CPF as PK.
CREATE TABLE OS (
NUMEROOS NUMBER(9) NOT NULL PRIMARY KEY,
DATAABERTURA VARCHAR2(40) NOT NULL,
HORARIOABERTURA VARCHAR2(40) NOT NULL,
STATUS VARCHAR2(40) NOT NULL,
CPF VARCHAR2(14) FOREIGN KEY REFERENCES CLIENTE(CPF),
DISPOSITIVO VARCHAR2(40) NOT NULL,
MARCA VARCHAR2(40) NOT NULL,
MODELO VARCHAR2(40) NOT NULL,
NUMEROSERIE VARCHAR2(40),
IMEI VARCHAR2(40),
DESCRICAOPROBLEMA VARCHAR2(400) NOT NULL,
OBSERVACOES VARCHAR2(40)
)