• subscribe
October 22, 2009 12:00 AM

Enforce Multitable Constraints Using Indexed Views

Indexed views work better than CHECK constraints and triggers
SQL Server Pro
InstantDoc ID #102690
Downloads
102690.zip

Listing 5: Code to Drop Created Objects
DROP VIEW ITEM_IN_TRAY_OR_BOX_V
DROP TABLE NUMS
DROP TABLE ITEM_IN_TRAY 
DROP TABLE ITEM_IN_BOX 
DROP TABLE ITEM


ARTICLE TOOLS

Comments
  • Michael
    3 years ago
    Nov 05, 2009

    Very cool.
    I wrote about this exact subject a year ago.
    http://dbwhisperer.blogspot.com/2008/11/adding-check-constraint-to-view.html
    But the implementations were different, in my case, I didn't make use of a nums table.

You must log on before posting a comment.

Are you a new visitor? Register Here