标签:pre postgre ges rtm .com art logs pat images
select * from departments
/*
查询子级部门 path <@ ‘‘ 查询上级部门 path @>
path: 部门id用‘.‘连接
*/
select id,name,path,parent_id from departments where path <@ cast(‘NE*********Pc.NE*********Pd.NE*********Ra‘ as ltree)
标签:pre postgre ges rtm .com art logs pat images
原文地址:http://www.cnblogs.com/cuit-lin/p/6408352.html