What is the difference in these two queries as getting two different result set?

后端 未结 6 1056
礼貌的吻别
礼貌的吻别 2020-12-06 14:18

I am getting different result set for these two queries and second result set seems to be correct. What is the difference in these queries.

What type of inner join q

6条回答
  •  Happy的楠姐
    2020-12-06 14:47

    I believe that it is like this:

    The first query gets all the results from the joined tables and then filters on the WHERE clause.

    The second query gets the results from table 1 where the StatusID = 12 and then performs the join on the result set.

    It's a subtle difference.

    Edit: Here's a link to an article verifying the difference: http://www.sqlteam.com/article/additional-criteria-in-the-join-clause

提交回复
热议问题