筛选出会计科目是叶子节点的科目

select a.* from SYS_Account a
where a.id not in (
    select pId from SYS_Account
    where isDel = 0 
    and id <> '-1000'
    --null
)
and isDel = 0 and id <> '-1000'

 

posted @ 2013-01-25 16:42  xust  阅读(200)  评论(0)    收藏  举报