NavigationUser login |
Additional Criteria in a JOIN ClauseAdditional information in an ON Clause can be confusing. Consider the difference between
and
Based on http://www.sqlteam.com/article/additional-criteria-in-the-join-clause The first case does what you would expect - printing out books and sales data for store 123. The second case takes each row in the books table and adds to it EITHER the row from the sales table if sales.bookId = books.bookID AND the sales.storeId is 123 Or else a row of NULLS. So in this case you get a list of all books plus the store information if the book was sold by store 123.
|
Recent blog posts
|