34,590
社区成员
发帖
与我相关
我的任务
分享
select *
from consult_booking a
left join code b
on a.illness_condition = b.code
and b.code_type_id = 17;
select *
from consult_booking a, code b
where b.code_type_id = 17
and (a.illness_condition = b.code or a.illness_condition is null);
select *
from consult_booking a, code b
where b.code_type_id = 17
and a.illness_condition = b.code
union
select *
from consult_booking a, code b
where b.code_type_id = 17
and a.illness_condition is null