can check constraints reference other tables

The solution for “can check constraints reference other tables” can be found here. The following code will assist you in solving the problem.

— Check constraints cannot refer to other tables, but can call a function
alter table YourTable
add constraint chk_CheckFunction
check (dbo.CheckFunction() = 1)

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in