I have a table of parents and childs uid, parentid1, 02, 03, 14, 1
what I want to do is return the top level parents (ie this with parent id = 0), but ONLY those that have children, so for the table above I would see uid = 1 as it is the parent of 3 & 4, but not poor old 2 as it is child-less.Now I have done this with the following :select uid from [tablename] where parentid = 0 and uid in (select parentid from [table name]) which works (which is nice) but was wondering if there was a "better" way.