79124634

Date: 2024-10-25 07:18:22
Score: 1
Natty:
Report link

I would just like to add here that sometimes you will see issue while adding a FK contraint like The ALTER TABLE statement conflicted with the FOREIGN KEY constraint . The conflict occurred in database ,<db_name>, table <table_name>, column <colum_name> and when you try to drop it will show error as mentioned in above topic heading.

You can check the values of this column in source table which you are trying to reference in the current table. It might happen that current table doesnt have the values present in source table due to some default values loaded maybe , if you can change that it will work as expected.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Sakhi