From: Dennis Cote <[EMAIL PROTECTED]> > No, that's not true. A sub-query is like any other query. I have > rearranged the query to make it more readable. > > select types.Track,types.URL > from ALBUM > inner join (select * from MUSIC where Artist_Id =?) as types > on ALBUM.AlbumId=types.Album_Id > order by ALBUM.YomiAlbumName; > > In this case the sub-query is returning the subset of the Music table by > the specified artist. This result table is given the name "types", and > it is joined to the album table.
I didn't know this was possible -- my trusty "learn SQL in 10 minutes" has failed me. But it makes sense from your explanation. Thanks. In most cases like this, I've 'hidden' the join inside a view so the syntax is clean. But, I expect moving the filtering before the join is much more efficient, no? _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users