select u.id,u.name,u.sex,
  2    (case u.sex
  3      when 1 then ''
  4      when 2 then ''
  5      else '空的'
  6      end
  7     )性别
  8  from users u;
 
                                     ID NAME                        SEX 性别
--------------------------------------- -------------------- ---------- ------
                                      1 张一                            空的
                                      2 张二                          13 张三                            空的
                                      4 张四                            空的
                                      5 张五                          26 张六                          17 张七                          28 张八                          1
 

相关文章:

  • 2022-12-23
  • 2021-09-01
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-10
  • 2021-11-21
  • 2022-03-10
  • 2021-07-21
相关资源
相似解决方案