select a.id,(case a.sex when '1' then '0' else '1' end),b.department_id from USER a,user_department b where a.user_id=b.user_id;
select a.id,(case a.sex when '1' then '0' else '1' end),b.department_id from USER a,user_department b where a.user_id=b.user_id;