MySQL查询结果使用if else
SELECT IF(sex=1,'男','女') FROM doctor
mybatis类似if else 的查询方式
select * from p
where 1 = 1
<choose>
<when test="cityId != null ">
cityId = 1
</when >
<otherwise>
cityId = 0
</otherwise>
</choose>