select u.staff_NO, s.STAFF_NAME, S.*, u.* from M_USER_INFO U leftjoin MS_V_STAFF_INFO S on u.staff_NO = s.staff_NO and s.dept_code ='4' where u.app_id ='MS' select u.staff_NO, s.STAFF_NAME, S.*, u.* from M_USER_INFO U leftjoin (select*from MS_V_STAFF_INFO where dept_code ='4') S on u.staff_NO = s.staff_NO where u.app_id ='MS'
select u.staff_NO, s.STAFF_NAME, S.*, u.* from M_USER_INFO U leftjoin MS_V_STAFF_INFO S on u.staff_NO = s.staff_NO where u.app_id ='MS' and s.dept_code ='4'