Hmm not really, it replaces the assumption that a.id is a foreign key to b.id.
The OP does not specify. If there is a relation between the id's (which there should be in my opinion, and if the data provided represents all possibilities, then this is indeed the case) your solution is the more efficient.
However if the id's are not related then that only leaves the initial letters, in which case my alternate solution will do.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
Offline 1,181 posts
since Feb 2005