status in sysconstraints

When I do
*select distinct status  from sysconstraints

I get 4 digit and 5 digit numbers. what are they?
suggest single digit values...
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


in the mean time, you can use:  select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
SELECT            sc.constid ConstraintID,
            CASE WHEN sc.colid = 0 THEN '' ELSE END ColumnName,
                        CASE WHEN sc.Status & 32 = 32 THEN ', Table-level' ELSE '' END +
                        CASE WHEN sc.Status & 16 = 16 then ', Column-level' ELSE '' END +
                        CASE WHEN sc.Status &  5 = 5 then ', DEFAULT' ELSE '' END +
                        CASE WHEN sc.Status &  4 = 4 then ', CHECK' ELSE '' END +
                        CASE WHEN sc.Status &  3 = 3 then ', FOREIGN KEY' ELSE '' END +
                        CASE WHEN sc.Status &  2 = 2 then ', UNIQUE KEY' ELSE '' END +
                        CASE WHEN sc.Status &  1 = 1 then ', PRIMARY KEY' ELSE '' END,
                   3, 100) + ' constraint'
FROM            sysconstraints sc
INNER JOIN      sysobjects so ON = AND so.xtype = 'u'
LEFT JOIN      syscolumns s ON s.colid = sc.colid AND =

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
anushahannaAuthor Commented:
Thanks Genius!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.