Witam, nie mogę założyć klucza obcego na tabele.
używam polecenia
ALTER TABLE Tabela2
ADD CONSTRAINT FK_IdTabela1_Tabela1_Tabela2 FOREIGN KEY (IdTabela1) REFERENCES Tabela1(IdTabela1)
otrzymuję komunikat
Msg 547, Level 16, State 0, Line 1
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_IdTabela1_Tabela1_Tabela2". The conflict occurred in database "Baza", table "dbo.Tabela1", column 'idTabela1'.
próby założenia klucza za pomocą MSSQLMS też nie skutkuje zarówno przy Design->RelationShips lub za pomocą DatabaseDiagram :( pomocy!