0

I am in need of a help to build a query that references the primary key of my cadastro_cliente table. I already did with the date, but with the cadastro_cliente-> meter is not working.

enter image description here

The query I tried to use is:

ALTER TABLE medidor
ADD CONSTRAINT Fk_cadastro_cliente
Foreign KEY (Cad_geral_cli_codigo)
References Cadastro_cliente (Cad_geral_cli_codigo);
3
  • 1
    So what is the actual problem you're having then?
    – Barmar
    Jun 29, 2018 at 0:30
  • I'm trying to create a query that takes a foreign key from my meter table referencing its primary key. But it doesn't work. Jun 29, 2018 at 0:34
  • 3
    "it doesn't work" isn't a useful question. Do you get an error? What is the error?
    – Barmar
    Jun 29, 2018 at 0:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.