sql-查询本级以及下级

SELECT dept_id FROM sys_dept WHERE dept_id = 100 or find_in_set(100, ancestors)

你可能感兴趣的:(sql,mysql,数据库)