救一条SQL语句,在select语句中用if select studentid,isnull(score,0)as score from studnet 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 TO: LBYYBL(o_o) 谢谢!试用了,可以.不过我想问一下.能在select语句中嵌入if语句么. 那怎样用select 加if 来完成上面的问题. 没有if语句,要用case语句select studentid,case( when score is null then 0 else score end)as score from studnet to wang_jzh(casper): 好像不行哦,系统报错说,在关键字 'when' 附近有语法错误。 select studentid,(case when score is null then 0 else score end) as score1 from student 数据还原问题,急! SQL2008导入.csv文件的时候怎么去掉引号? 急 急 急!! 各位大峡帮我看看我的语句有没有毛病,谢谢! 如何获取insert的数据的ID值?id为自动增长类型. sql数据检索唯一值怎么做? 请大家帮忙,waitfor控制影响 呵呵,你算高手吗? 请问,有没有可能通过代码把SQL SERVER上的所有视图的连结关系列出,我想列出清单表明每一个VIEW都是由哪几个表构成,库中有几百个视图, 关于存储过程的一个奇怪问题 SQL语句挑战透视表 怎么清除sqlserver里面的日志? 表消失的问题
谢谢!试用了,可以.
不过我想问一下.能在select语句中嵌入if语句么.
select studentid,case( when score is null then 0 else score end)as score from studnet