1
Answer

I am getting this error when I am trying to make foreign key relationship?

Chakshu Jindal

Chakshu Jindal

12y
899
1
I am getting this error when I am trying to make foreign key relationship :

As soon as I click on save, this error occurs :-

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_tb_stadmdet_tb_prgdet". The conflict occurred in database "admission", table "dbo.tb_prgdet", column 'prgcod'.

Can anybody help me out with this problem, THANKS
Answers (1)
1
Santhosh Kumar Jayaraman

Santhosh Kumar Jayaraman

NA 9.9k 2.3m 12y
You tried to alter the table with out dropping the key FK_tb_stadmdet_tb_prgdet..Drop this key and add again.