Solved

how to get the total number of constraints in schema in sybase

Posted on 2010-09-08
3
785 Views
Last Modified: 2012-06-27
how to get the total number of constraints in schema in sybase
0
Comment
Question by:vkchaitu82
3 Comments
 
LVL 14

Expert Comment

by:Jan_Franek
ID: 33634188
If you are on Sybase Adaptive Server Enterprise, there is a system table named sysconstraints - see http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.tables/html/tables/tables25.htm
0
 
LVL 13

Accepted Solution

by:
alpmoon earned 250 total points
ID: 33634217
Please clarify whether you need all constraints including primary key, foreign key and check constraint. Otherwise the answer might be simpler.

You can find out total number of check constraints and referential constraints by using sysconstraints. But you need to count primary keys in sysindexes as well. You can use 2nd bit of status2 column for that purpose.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question