select paymentType from paymentAccount


  output
  p
  f


我如何显示输出像

  output
  Part
  Full

最佳答案

像这样重写:

select CASE paymentType WHEN 'p' THEN 'Part' WHEN 'f' THEN 'Full' END AS paymentType from paymentAccount

关于mysql - 在选择语句中替换/分配值,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7977310/

10-12 06:43