Mysql query becomes male and female gender field 0,1

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/caoxuecheng001/article/details/102555516
select id,saleid,customer,
		 case t.sex when '0' then '男' else '女' end as sex,
		birth,address,phone,idcard,comments
		from t_sale_customer t 

 

Guess you like

Origin blog.csdn.net/caoxuecheng001/article/details/102555516