A key violation occurs if:
If you run such a query, it will not modify the records that cause the key violation.
To modify records in a way that will violate referential integrity, you can break the relationship between the affected tables or turn referential integrity off, and then modify the affected tables one at a time. However, the resulting data in the two tables may then conflict.