deferred constraint checking

蹲街弑〆低调 提交于 2019-12-01 05:04:34
Aaron Alton

There is no native way to do deferred constraint checking in SQL Server.

Likely your best option is to insert a NULL value into the foreign key column in the first table until the second record is inserted, and then as part of the same transaction, update the foreign key column in the first table.

I'm interested - what is the business reason for your circular reference? It's definitely an extraordinary requirement.

Also have a look at this thread, on the same topic.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!