SQL How to replace values of select return?

前端 未结 7 1252
无人共我
无人共我 2020-12-04 18:02

In my database (MySQL) table, has a column with 1 and 0 for represent true and false respectively.

But in S

7条回答
  •  囚心锁ツ
    2020-12-04 18:27

    I got the solution

       SELECT 
       CASE status
          WHEN 'VS' THEN 'validated by subsidiary'
          WHEN 'NA' THEN 'not acceptable'
          WHEN 'D'  THEN 'delisted'
          ELSE 'validated'
       END AS STATUS
       FROM SUPP_STATUS
    

    This is using the CASE This is another to manipulate the selected value for more that two options.

提交回复
热议问题