Description:
How in ERwin can you create and generate a NOCHECK option on Tables for SQL Server 2005/2008?
For example:
ALTER TABLE [Table_Name] WITH NOCHECK ADD CONSTRAINT ...
Solution:
To assign a 'CHECK' or 'NOCHECK' to a table you do the following:
- Right mouse click on a Table in your diagram or in the Model Explorer and select 'Table Properties' or 'Properties'.
- Go to the 'Validation' tab.
- Select the 'New' icon to create a new 'Validation'.
- You then have the option to select 'With Check' and either 'True' or 'False'. True resulting in 'CHECK' and False resulting in 'NOCHECK'.
- When you then go to the 'Forward Engineer' make sure that you have 'Table Validation' selected in the 'Table' options in the 'Options' tab.
You should now be able to see the statements in your DDL generation when you do a Preview:
ALTER TABLE <TABLENAME> WITH CHECK ADD CONSTRAINT
ALTER TABLE <TABLENAME> WITH NOCHECK ADD CONSTRAINT
Comments
0 comments
Please sign in to leave a comment.