Andre Telecom Ti Posted June 22, 2012 Report Share Posted June 22, 2012 Ao realizar o processo de exclusão de um produto ocorre o seguinte erro.delete from estoque where doacao = '404444' and produto = '12' and bolsa = '00';ERROR: update or delete on table "estoque" violates foreign key constraint "$7" on table "estoqueconversao"DETAIL: Key (codigo)=(842997) is still referenced from table "estoqueconversao".********** Error **********ERROR: update or delete on table "estoque" violates foreign key constraint "$7" on table "estoqueconversao"SQL state: 23503Detail: Key (codigo)=(842997) is still referenced from table "estoqueconversao". Quote Link to comment Share on other sites More sharing options...
0 Kakao Posted June 22, 2012 Report Share Posted June 22, 2012 Você deve primeiro deletar o codigo correspondente na tabela referenciadora "estoqueconversao". Quote Link to comment Share on other sites More sharing options...
0 Andre Telecom Ti Posted June 22, 2012 Author Report Share Posted June 22, 2012 Kakao, muito obrigado, era isto mesmo, foi uma falta de atenção da minha parte.Estava fazendo um relacionamento a esta tabela, deletei o valor da tabela e resolvido.Muito obrigado. Quote Link to comment Share on other sites More sharing options...
Question
Andre Telecom Ti
Ao realizar o processo de exclusão de um produto ocorre o seguinte erro.
delete from estoque where doacao = '404444' and produto = '12' and bolsa = '00';
ERROR: update or delete on table "estoque" violates foreign key constraint "$7" on table "estoqueconversao"
DETAIL: Key (codigo)=(842997) is still referenced from table "estoqueconversao".
********** Error **********
ERROR: update or delete on table "estoque" violates foreign key constraint "$7" on table "estoqueconversao"
SQL state: 23503
Detail: Key (codigo)=(842997) is still referenced from table "estoqueconversao".
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.