﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Chris Cubley / Article Discussions / Article Discussions by Author  / Using Exotic Joins in SQL Part 2 / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 10:21:54 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Using Exotic Joins in SQL Part 2</title><link>http://www.sqlservercentral.com/Forums/Topic9522-89-1.aspx</link><description>I don't know of any performance difference from putting the join criteria of an inner join into the where clause rather than the from clause.  However, I always put join criteria (comparisons between columns of tables) in the from clause for consistency's sake because there IS a difference when it comes to outer joins.  By doing it the same for inner and outer joins, things are easier down the road if you need to change the code.Chris Cubleywww.queryplan.com&lt;BLOCKQUOTE id=quote&gt;&lt;font size=1 face="Verdana, Arial, Helvetica" id=quote&gt;quote:&lt;hr height=1 noshade id=quote&gt;&lt;BLOCKQUOTE id=quote&gt;&lt;font size=1 face="Verdana, Arial, Helvetica" id=quote&gt;quote:&lt;hr height=1 noshade id=quote&gt;Is there an advantage in putting the inequality in the join statement rather than in a WHERE clause?  Does the query run faster?  example: SELECT s.CourseID,s.SectionNumber,c.RoomCapacity, s.SectionCapacityFROM tb_ClassSection sINNER JOIN tb_Classroom cON ( s.BuildingName = c.BuildingName   AND s.RoomNumber = s.RoomNumber)WHERE c.RoomCapacity &amp;lt; s.SectionCapacity&lt;hr height=1 noshade id=quote&gt;&lt;/BLOCKQUOTE id=quote&gt;&lt;/font id=quote&gt;&lt;font face="Verdana, Arial, Helvetica" size=2 id=quote&gt;That would be my questions too. Too bad there's no answer. &lt;hr height=1 noshade id=quote&gt;&lt;/BLOCKQUOTE id=quote&gt;&lt;/font id=quote&gt;&lt;font face="Verdana, Arial, Helvetica" size=2 id=quote&gt; </description><pubDate>Thu, 26 Jun 2003 15:07:00 GMT</pubDate><dc:creator>ccubley</dc:creator></item><item><title>RE: Using Exotic Joins in SQL Part 2</title><link>http://www.sqlservercentral.com/Forums/Topic9522-89-1.aspx</link><description>&lt;BLOCKQUOTE id=quote&gt;&lt;font size=1 face="Verdana, Arial, Helvetica" id=quote&gt;quote:&lt;hr height=1 noshade id=quote&gt;Is there an advantage in putting the inequality in the join statement rather than in a WHERE clause?  Does the query run faster?  example: SELECT s.CourseID,s.SectionNumber,c.RoomCapacity, s.SectionCapacityFROM tb_ClassSection sINNER JOIN tb_Classroom cON ( s.BuildingName = c.BuildingName   AND s.RoomNumber = s.RoomNumber)WHERE c.RoomCapacity &amp;lt; s.SectionCapacity&lt;hr height=1 noshade id=quote&gt;&lt;/BLOCKQUOTE id=quote&gt;&lt;/font id=quote&gt;&lt;font face="Verdana, Arial, Helvetica" size=2 id=quote&gt;That would be my questions too. Too bad there's no answer. </description><pubDate>Thu, 26 Jun 2003 07:18:00 GMT</pubDate><dc:creator>bjmarte</dc:creator></item><item><title>RE: Using Exotic Joins in SQL Part 2</title><link>http://www.sqlservercentral.com/Forums/Topic9522-89-1.aspx</link><description>Is there an advantage in putting the inequality in the join statement rather than in a WHERE clause?  Does the query run faster?  example: SELECT s.CourseID,s.SectionNumber,c.RoomCapacity, s.SectionCapacityFROM tb_ClassSection sINNER JOIN tb_Classroom cON ( s.BuildingName = c.BuildingName   AND s.RoomNumber = s.RoomNumber)WHERE c.RoomCapacity &amp;lt; s.SectionCapacity </description><pubDate>Tue, 11 Feb 2003 13:34:00 GMT</pubDate><dc:creator>nlcapit</dc:creator></item><item><title>RE: Using Exotic Joins in SQL Part 2</title><link>http://www.sqlservercentral.com/Forums/Topic9522-89-1.aspx</link><description>Good article with valuable information, but it appears that this has a repeated typo.  Shouldn't  &lt;b&gt;s.RoomNumber = &lt;font color=red&gt;s&lt;/font id=red&gt;.RoomNumber&lt;/b&gt; be &lt;b&gt;s.RoomNumber = &lt;font color=red&gt;c&lt;/font id=red&gt;.RoomNumber&lt;/b&gt;? </description><pubDate>Wed, 05 Feb 2003 23:32:00 GMT</pubDate><dc:creator>AjarnMark</dc:creator></item><item><title>Using Exotic Joins in SQL Part 2</title><link>http://www.sqlservercentral.com/Forums/Topic9522-89-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF=http://www.sqlservercentral.com/columnists/ccubley/usingexoticjoinsinsqlpart2.asp&gt;http://www.sqlservercentral.com/columnists/ccubley/usingexoticjoinsinsqlpart2.asp&lt;/A&gt;</description><pubDate>Sat, 25 Jan 2003 00:00:00 GMT</pubDate><dc:creator>ccubley@queryplan.com</dc:creator></item></channel></rss>