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