-2
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 I am missing?
I am editing the databank straight from Netbeans. 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)
)
I did so, apparently it worked... thank you
– Alexandre Bezerra
@Alexandrebezerra if the solution helped you, do not forget to mark as solved.
– Adriano Gomes
How do you mark as resolved?
– Alexandre Bezerra