news 2026/5/15 16:53:13

5.13mysql

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
5.13mysql
drop procedure if exists if_demo; -- 删除存储过程 delimiter $$ create procedure if_demo() begin -- { declare avg decimal(5,2); -- 计算平均分 SELECT @avg:=avg(result) FROM `score`; -- 分支语法 IF @avg>=70 THEN select * from score order by result desc limit 3; ELSE select * from score order by result asc limit 3; END IF; end $$ -- } delimiter ; call if_demo(); -- 调用存储过程 drop procedure if exists while_demo; delimiter $$ create procedure while_demo() begin declare pelple_count int; select @pelple_count:=count(*) from score where result < 90; WHILE @pelple_count>0 DO update score set result = result + 2 where result <= 98; -- 进入循环后重新赋值没及格数量 select @pelple_count:=count(*) from score where result < 90; END WHILE; select '所有人员均已达标'; end $$ delimiter ; call while_demo(); SELECT case when result > 90 then 'A' when result > 80 then 'B' when result > 70 then 'C' when result > 60 then 'D' else 'E' end FROM `score`; select count(case when result between 90 and 100 then 1 end) 'A的数量', count(case when result between 80 and 89 then 1 end) 'B的数量', count(case when result between 70 and 79 then 1 end) 'C的数量', count(case when result between 60 and 69 then 1 end) 'D的数量', count(case when result between 0 and 59 then 1 end) 'E的数量' from score; select case when gender = '0' then '女性的性别是0' else '男性的性别是1' end from student;
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/15 13:28:15

面向 LLM 的文本数据清洗

当越来越多企业投入AI数智化转型&#xff0c;搭建企业知识库成为热门方向。然而&#xff0c;不少企业发现知识库上线后效果远不及预期——大模型经常胡说八道&#xff0c;回答与文档内容对不上号。复盘下来&#xff0c;问题的根源往往不在模型本身&#xff0c;而在于喂给LLM的数…

作者头像 李华
网站建设 2026/5/14 1:59:53

ARM ERXMISC2寄存器解析与RAS错误处理实践

1. ARM系统寄存器ERXMISC2深度解析在ARM架构的可靠性扩展&#xff08;RAS&#xff09;中&#xff0c;ERXMISC2寄存器扮演着关键角色。作为Selected Error Record Miscellaneous Register 2&#xff0c;它专门用于访问特定错误记录中的附加信息。理解这个寄存器的工作原理&#…

作者头像 李华
网站建设 2026/5/15 16:50:00

星露谷物语终极效率提升指南:13个必备游戏模组完全解析

星露谷物语终极效率提升指南&#xff1a;13个必备游戏模组完全解析 【免费下载链接】StardewMods Mods for Stardew Valley using SMAPI. 项目地址: https://gitcode.com/gh_mirrors/st/StardewMods 还在为《星露谷物语》中繁琐的农场管理而烦恼吗&#xff1f;Pathoschi…

作者头像 李华
网站建设 2026/5/14 1:55:06

她说“看了个寂寞“,然后自己学会了AI

我写了七篇AI学习文章&#xff0c;数据惨淡&#xff0c;自己都看不下去。推给老婆&#xff0c;她说看了个寂寞。过了好几天&#xff0c;她突然开始用AI分析设计、研究教育、自己装工具。五一回了趟家&#xff0c;当了几天婚礼摄影。回来以后短暂地被修图占了一些时间。写作的弦…

作者头像 李华
网站建设 2026/5/14 1:51:44

安全、稳定是超自动化运维的底座

在超自动化运维的宏大叙事中&#xff0c;我们常常聚焦于“效率提升”、“智能决策”、“故障自愈”等令人振奋的能力——它们如同摩天大楼的华丽外观与智能设施&#xff0c;吸引着所有目光。然而&#xff0c;一个根本性的前提往往被忽视&#xff1a;任何超自动化运维体系&#…

作者头像 李华
网站建设 2026/5/14 1:51:44

如何在Windows上使用FanControl实现智能风扇控制与噪音优化

如何在Windows上使用FanControl实现智能风扇控制与噪音优化 【免费下载链接】FanControl.Releases This is the release repository for Fan Control, a highly customizable fan controlling software for Windows. 项目地址: https://gitcode.com/GitHub_Trending/fa/FanCo…

作者头像 李华