求sql语句,判断字段值为1(int型)则返回A,2返回B.... select aa=(case when a=1 then A when a=2 then B) from table 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select aa=case a when 1 then A when 2 then B endfrom table 上面少了个end这样:select (case when a=1 then 'A' when a=2 then 'B' end) as aafrom table sql server创建视图出错 sql server 中 string 数据类型的自动转换问题 这个通过 ID返回SQL用户IP的存储过程是不是有错误啊~! 1.大数据量千万级别的用户sns设计请教 请教一个较复杂的语句,关于join和group by! 单价历史查询问题 SQL2005编辑视图的字体如何变大? 菜鸟问题:从SQL2000备份的数据文件,是否可以正常地恢复到SQL7.0中? SQL SERVER数据库的同步问题! 請教文本指針和行文本指針. 能不能用一句SQL语句搞定下面的功能? 怎样显示image字段值
when 2 then B
end
from table
这样:select (case when a=1 then 'A'
when a=2 then 'B' end) as aa
from table