The correct answer is that query #2 will produce an Ambiguous column name error. The reason is simple - the column #1 for both queries would have the same name and come from the same table, resulting in SQL Server to be confused on what it should pick.
The good thing about trying to answer questions without executing the queries in them is that it forces you to think about what's going on under the hood. So, keep them coming!
commented on Sep 18 2011 4:59AM