find root nodes hierarchical tree


i have list database stores tree structure. here applicable fields:



mytree (id, parentid, otherfields...)


i wish root nodes (that is, any record whose id another record's parentid)



i've attempted this:



select * mytree where `id` (select graphic `parentid` `mytree`)


but returned an lifeless set. strangely, stealing "not" advantage set non-leaf nodes.



can anyone where i'm going wrong?



update: interjection answers folks, have repremand worked me. i've supposed daniel's given also explains since query didn't work (the zero thing).



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?