在数据库中查询某个值来判断并且重新赋值
[sql]
select name, case status when 1 then ‘正常’ when 0 then ‘删除’ when 2 then ‘审核’ end as ‘状态’ from ecs_plug_daili;
[/sql]
在数据库中查询某个值来判断并且重新赋值
[sql]
select name, case status when 1 then ‘正常’ when 0 then ‘删除’ when 2 then ‘审核’ end as ‘状态’ from ecs_plug_daili;
[/sql]
发表评论