select A.人员id  A.人员姓名 
 case B.部门id when 'null' then '未标志' else   B.部门 end  as 部门名
from 人员 A left outer join 部门 B on A. 部门id = B. 部门id提供一点点思路  呵呵