+ -
当前位置:首页 → 问答吧 → 如何将查询出来的结果1显示成成功,2显示成失败?

如何将查询出来的结果1显示成成功,2显示成失败?

时间:2011-12-07

来源:互联网

如题:
select status from product

作者: JecyYu   发布时间: 2011-12-07

case when status=1 then 成功 else 失败 end

作者: happy664618843   发布时间: 2011-12-07

select case when status = 1 then '成功' else '失败' end from product

作者: dawugui   发布时间: 2011-12-07

case status when 1 then '成功' else '失败' end

作者: fredrickhu   发布时间: 2011-12-07

select case when status = 1 then '成功' else '失敗' end as status from product

作者: sjcss   发布时间: 2011-12-07

SQL code
select case when status = 1 then '成功' else '失敗' end as status from product

作者: Beirut   发布时间: 2011-12-07

select case status when 1 then '成功' else '失败' end as status from product

作者: mylovemoon2010   发布时间: 2011-12-07

SQL code

select case 
         when status=1 then '成功' 
         when status=0 then '失败'
       end
from product

作者: pengxuan   发布时间: 2011-12-07