SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
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  

michael1
Starting Member

28 Posts

Posted - 12/08/2004 :  03:30:12  Show Profile
Hi
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.
Regards
Michael

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

Andraax
Aged Yak Warrior

Sweden
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.

/Andraax
Go to Top of Page

robvolk
Most Valuable Yak

USA
15683 Posts

Posted - 12/08/2004 :  08:02:37  Show Profile  Visit robvolk's Homepage
This should get you started:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=41896
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.05 seconds. Powered By: Snitz Forums 2000