mysql中case when函數的用法

一、簡單case when查詢 語法爲:case when 條件 then 結果1 else 結果2 end 示例:web select user_id as userId, user_name as userName, user_sex as userSex, (case when user_sex = 0 then "男" else "女" end) as sex from user 查詢結
相關文章
相關標籤/搜索