select A.id,A.name, (case when B.Status= 0 then '缺勤' when B.Status = 1 then '出勤' else '缺勤' end) as status from TB_Business_Student A left join TB_Business_Attendance B on A.id = B.Studentid where B.Rq = '2019-01-07'
转载于:https://www.cnblogs.com/Anthony518/p/10908117.html