My bad. "Starting with MySQL 4.1, all subquery forms and operations that the SQL standard requires are supported, as well as a few features that are MySQL-specific." from: http://dev.mysql.com/doc/mysql/en/subqueries.html -- Ed McCarroll (310) 838-4330 Ed at ComSimplicity.com http://www.ComSimplicity.com Quoting Ed McCarroll <Ed at ComSimplicity.com>: > > I need some way to limit the result set so only uniquely private > > > stories are returned. > > Im not sure how MySQL does sub-queries, but in SQL Server, this > would > work: > > SELECT S.uid as uid, S.title as title > FROM news_stories as S, news_desk_stories as D > WHERE D.story = uid > AND D.desk = 2" > AND S.uid NOT IN > ( > SELECT S2.uid > FROM news_stories as S2, news_desk_stories as D2 > WHERE D2.story = S2.uid > AND D2.desk <> 1" > ) > -- > Ed McCarroll (310) 838-4330 > Ed at ComSimplicity.com http://www.ComSimplicity.com >