select
A.EMPLOYEE_ID, A.SEX, A.AGE, A.CARD_NO, A.GET_NUM, A.USR_ID, A.EMPLOYEE_ST, B.DESK_NUM, B.SALARY , B.BETTER_NUMBER
from TBL_UBP_ORDER A
left join TBL_PUP_ACCOUNT B on B.DESK_NUM = A.GET_NUM and A.USR_ID = B.USR_ID
where A.EMPLOYEE_ID = #{employee} and A.USR_ID = #{userId} and (B.BETTER_NUMBER = #{bussCode} or B.BETTER_NUMBER is null)
with ur
表B可为空,为空时还能查出表A内容。