Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 FIND DEFAULT AND CHECK CONSTRAINTS

Author  Topic 

paritosh
Starting Member

42 Posts

Posted - 2012-02-13 : 09:09:57
I HAVE A DATA BASE OF 100 TABLES

HOW TO GET WHICH TABLE HAVE DEFAULT ,CHECK AND NOT NULL CONSTRAINT
WITH NAME


PLS >>>>>>>>>>>

THANKS IN ADVANCE

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-13 : 09:32:28
for default constraints refer sys.default_constraints catalog view
for check constraints sys.check_constraints

and for NOT NULL columns refer sys.columns with condition is_nullable = 0

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2012-02-13 : 10:41:23
Also look at Information_schema views. You have many views to show various relationships

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-02-13 : 10:52:59
I was gonna say, go reference your data dictionary...but then I realized just how silly that would sound



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -