SQL How to replace values of select return?

前端 未结 7 1227
无人共我
无人共我 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:31

    You can do something like this:

    SELECT id,name, REPLACE(REPLACE(hide,0,"false"),1,"true") AS hide FROM your-table
    

    Hope this can help you.

提交回复
热议问题