declare @t table(flag bit)
insert into @t select 1
insert into @t select 0
select flag = case flag when 1 then '非用户' else '用户' end from @t

解决方案 »

  1.   

    select case [逻辑型字段] when 0 then '用户' else '非用户' end from [表]
      

  2.   

    楼上的几位高手,我刚才试了试,上面的语句不能用啊,sql语句能那样写吗?疑惑.
      

  3.   

    你的是MS SQL嗎?如果是,可以的。使用這句Select 字段 = (Case When 字段 = 0 Then '用户' Else '非用户' End) From 表
      

  4.   

    恩,不过access好象不行.正在想access的写法
      

  5.   

    ACCESS這麼寫Select IIF(字段, '非用户', '用户') From 表