so estou com duvidas
primeiro este é o meu codigo que eu achei na net
alter table Anuncio_Dados add foreign key (CodCliente) references Anuncio_Dados(CodCliente), foreign key (CodCliente) references Cadastro_Cliente(CodCliente)
so que ele retorna este erro:
Msg 1776, Level 16, State 0, Line 1 There are no primary or candidate keys in the referenced table 'Anuncio_Dados' that match the referencing column list in the foreign key 'FK__Anuncio_D__CodCl__55009F39'. Msg 1750, Level 16, State 0, Line 1 Could not create constraint. See previous errors.
bom a minha duvida seria eu tenho a tabela cadastro_cliente, e anuncio_dados
eu quero colocar uma foreign key na anuncio_dados relacionando na cadastro_cliente, como eu faria isto????........
e outra pergunta eu so posso criar foreign key por codigos pelo entepriser manager eu naum consigo????....