首页 > 数据库技术 > 详细

一个sql语句中用多个where

时间:2020-04-10 10:29:20      阅读:105      评论:0      收藏:0      [点我收藏+]

 

select SUM(case when total < 60 then 1 else 0 end) as studentMarks1,
       sum(case when total > 80 then 1 else 0 end) as studentMarks2 
from School
where Id = 8

参考:https://stackoverflow.com/questions/42481826/how-to-use-multiple-where-clause-in-one-sql-query

 

一个sql语句中用多个where

原文:https://www.cnblogs.com/zealousness/p/12671690.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!