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
 General SQL Server Forums
 New to SQL Server Programming
 inner join/where vs. enterprise mgr relationships
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

9 Posts

Posted - 04/09/2007 :  14:00:14  Show Profile  Send sjlsam an AOL message  Click to see sjlsam's MSN Messenger address  Reply with Quote
Hello, I am new to SQL and the site, thanks for taking the time to look at my post

I have been building all of my queries using the WHERE clause (which i read functions the same as an INNER JOIN) to deal with my related tables. my boss wants me to look into the functionality of the "Relationships..." option in Enterprise Manager to see if it is more efficient to use and would eliminate the need for a WHERE clause

i have created some relationships using this "Relationships..." dialogue box to test out what happens (without using WHERE in this test scenario), the output seems to remain the same except for the fact that it looks like more rows are being queried to determine which ones are related

can you help me understand what the benefit of doing Relationships through Enterprise Manager is as opposed to using WHERE clauses to join related tables?

Flowing Fount of Yak Knowledge

5581 Posts

Posted - 04/09/2007 :  14:36:00  Show Profile  Visit harsh_athalye's Homepage  Click to see harsh_athalye's MSN Messenger address  Send harsh_athalye a Yahoo! Message  Reply with Quote

1.Relationships are created in order to force a column to have its values derived from other related table (foreign key relationship). Basically, this means there are two tables - Parent and Child. Foreign key column in Child table can have only those values which are defined in Parent table's key column.

2.JOINs are used to retrieve data from two or more tables based on some common column

3. WHERE clause is used limit the number of rows based on some condition. It can be used to specify JOIN condition as well but that is not a preferred way.

I suggest you to purchase some good book on SQL Server (like Programming SQL Server by Rob Viera) which can clear your concepts on this. Also, you can go through SQL Server help if that suits you.

Harsh Athalye
Go to Top of Page

Almighty SQL Goddess

38200 Posts

Posted - 04/09/2007 :  14:36:45  Show Profile  Visit tkizer's Homepage  Reply with Quote
Using the JOIN syntax is ANSI compliant whereas what you are doing is not.

Tara Kizer
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 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