mssql 中的select取值如何对该值做多重判断? 比如我在select的时候有个字段a,我想判断该a的值为0时显示 'none',为1时显示 'true',为2时显示 'false'该如何实现,求高手赐教.谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 case when <boolean > then .. else ... end SELECT CASE a WHEN 0 THEN 'none' WHEN 1 THEN 'true' WHEN 2 THEN 'false' END FROM tb case when 字段a = 0 then 'none' when 字段a = 1 then 'true' else 'false' endfrom tacase 字段a when 0 then 'none' when 1 then 'true' else 'false' endfrom ta 高分请教 我的update方法,不知会不会有后遗症或别的什么 有关SQL语句的批处理机制。 如何取最低的两个价格? 按多个时间段分组,然后求每个时段的最后一笔记录 大家给个数据库电子图书的下载地址吧! 这样的分类汇总,可能吗? showplan是什么啊 请对SqlServer系统表比较熟悉的兄弟出手相助。 求人写一个SQL存储过程, 查询评论最多的10条新闻ID 两表联合问题~~请教高手
WHEN 0 THEN 'none'
WHEN 1 THEN 'true'
WHEN 2 THEN 'false'
END
FROM tb
from ta
case 字段a when 0 then 'none' when 1 then 'true' else 'false' end
from ta