![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Mysql学习
wuzhicheng123456
这个作者很懒,什么都没留下…
展开
-
Mysql
关键字:proceduredrop procedure if exists pp;/*如果存在存储过程pp则删除pp*/delimiter // /**设置以//为sql语句结尾*/1:不带参数的存储过程create procedure pp()beginselect count(*) from t_com_dim_date;end//原创 2014-12-24 16:28:24 · 292 阅读 · 0 评论 -
mysql 统计不同成绩阶段的人数
case when 用sum而不是countselect sum(case when score<60 then 1 else null end) bujige,sum(case when score>=60 and score<80 then 1 else null end) jige,sum(case when score>=80 then 1 el...原创 2018-07-23 22:09:20 · 5505 阅读 · 0 评论