Duvidas na criação do bd.

Firebird

27/03/2008

Caros colegas.

Estou tentando fazer uma foreign key no interbase.

-----------------------------------------------------------------------
alter table calcgas
add constraint fk_orcamento_calcgas foreign key (id_nref) references orcamento (nref)
------------------------------------------------------------------------

Mas ele da o seguinte erro:

--------------------------------------------------------------------
Unsuccessful metadata update
could not find UNIQUE INDEX with specified columns
Statement: alter table calcgas
add constraint fk_orcamento_calcgas foreign key (id_nref) references orcamento (nref)
--------------------------------------------------------------------

Se alguém puder me ajudar...

Obrigado.


Uelinton_reis

Uelinton_reis

Curtidas 0

Respostas

Sremulador

Sremulador

27/03/2008

verificque se o campo de referencia e unico, e indexado


GOSTEI 0
POSTAR