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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Check whether a relationship already exists !!!
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

28 Posts

Posted - 12/08/2004 :  03:30:12  Show Profile
Let me know how to do this using SQl query -
How to check whether a relationship is already set between 2 tables on a particular key. If it is not set then make a relationship.

Edited by - michael1 on 12/08/2004 03:30:38

Aged Yak Warrior

790 Posts

Posted - 12/08/2004 :  06:58:36  Show Profile
Hello Michael!

It sure is possible. My tip to you is to look up the INFORMATION_SCHEMA views in Books Online. Some of the views contain the information you need. For example, look att INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS and INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE.

Go to Top of Page

Most Valuable Yak

15732 Posts

Posted - 12/08/2004 :  08:02:37  Show Profile  Visit robvolk's Homepage
This should get you started:
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000