Not quite what was meant. The original subquery evaluates to a (possibly repeated) set of all the code values from table1. Thus the condition "IN" always evaluates to...
In addition to all the other good points people are making, it should be noted that the first example is an inner join, and the second results in what amounts...