• 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 Cubley

    http://www.queryplan.com

    quote:


    quote:


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

    FROM tb_ClassSection s

    INNER JOIN tb_Classroom c

    ON ( s.BuildingName = c.BuildingName

    AND s.RoomNumber = s.RoomNumber)

    WHERE c.RoomCapacity < s.SectionCapacity


    That would be my questions too. Too bad there's no answer.