Two suggestions to enhance constraints in SQL Server Alexander Kuznetsovhttp://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/05/04/two-suggestio......
Alexander Kuznetsov
http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/05/04/two-suggestions-to-enhance-constraints-in-sql-server.aspx
We can tuck any logical expressions in CHECK constraints, but all foreign keys are currently capable of right now is to verify that one or more column values are equal. In many cases it would be very useful to have foreign keys use more complex logical expressions. Also in some cases the ability to create constraints on indexed views would be very handy too. I will provide examples and hopefully we will come up with Connect items to vote for.
When more complex logical expressions in foreign keys are useful
Consider the following simple common sense rule: the maximum current of your device cannot exceed the maximum current of the circuit you plug it into. Suppose that the following tables store data about circuits and devices:
2/29 首页 上一页 1 2 3 4 5 6 下一页 尾页 |