[em01]SQl查询1:
select * from 树表
where IDparent is NULL or IDparent in (select * from 树表 where IDparent is NULL )
[em01]SQl查询2:
select * from 树表 where IDparent is NULL
union
SELECT 树表_1.*
FROM 树表 LEFT JOIN 树表 AS 树表_1 ON 树表.id = 树表_1.idparent
WHERE (((树表.idparent) Is Null))