I have the following tables:
Create table OS(
nro_os number(4),
data_os date ,
hora_os number(4)
);
Create table cliente(
cod_cliente number(4),
nome_cliente varchar(12),
endereco_cliente varchar(20),
telefone_cliente number(11)
);
And I have the following ALTER TABLE:
Alter table OS
add (constraint cliente_cod_cliente_fk foreign key (cod_cliente) references cliente (cod_cliente));
But when I run the query, it returns the error:
ORA-00904: "COD-CLIENT": Invalid identifier
How can I add the foreign key with ALTER TABLE correctly?