字段:thing_id,recive_pho,send_id,yanzhen_id,box_id,state;
我需要在查询的时候将box_id,state的值替换为用户可以理解的字符,方法如下:
select thing_id,recive_pho,send_id,yanzhen_id,case box_id when 1 then '大' when 2 then '中' else '小' end as box_id,case state when 1 then '有' else '无' end as state from thing;