日期:2014-05-17 浏览次数:20436 次
create view [视图名] as select case [列名] when 1 then 0 when 0 then 1 end '[列名]',[其他字段] from [表名]
------解决方案--------------------
--1 select substring('否是',列+1,1) from tb --2 select case when 列=1 then '是' else '否' end from tb
------解决方案--------------------
create view view_convert as select case colname when 0 then N'是' else N'否' end as colname, 其他字段 from [表名] end
------解决方案--------------------
case when 字段 = 0 then '否' when 字段 = 1 then '是' else '无效' end
------解决方案--------------------
sorry,1楼有误,重写.
create view [视图名] as select case [列名] when 1 then '否' when 0 then '是' end '[列名]',[其他字段] from [表名]