The ALTER TABLE statement conflicted with the FOREIGN KEY constraint

Just to clarifyhow to solvethis in SQL Server 2005....To carry on from what theDamian said.....

If you in diagram view on you Database. Right click the table that is being referenced by the foreign key and click References, then clickon the reference which is testing your patience. Then all you have to do in the (GENERAL) tab is switch the "Check Existing Data On Creation Or Re-Enabling" to NO.....Then BANG!!!!!

No more probs :-)

Enjoy.

建立外键时候,Check Existing Data On Creation Or Re-Enabling设置成no

放弃已有数据,只为将来的数据建立外键。

来自:http://forums.microsoft.com/msdn/showpost.aspx?postid=478256&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=0

你可能感兴趣的:(sql,SQL Server,Microsoft)