2022-10-27 459
MySQL多个条件判断是怎样的呢?下面就为您举例说明MySQL多个条件判断,希望对您学习MySQL多个条件判断方面能够有所启迪。
useindustry_finance; DELIMITER// dropprocedureifexistsupdateCursor// CREATEPROCEDUREupdateCursor() BEGIN declareidvarchar(20); declaremonthvarchar(20); declareseasonvarchar(20); declarecur1CURSORFORSELECTID_,month_FROMt_industry_finance_instance; OPENcur1; FETCHcur1INTOid,month; WHILE(idisnotnull)DO if(month='01'||month='02'||month='03')THENsetseason='1'; endif; if(month='04'||month='05'||month='06')THENsetseason='2'; endif; if(month='07'||month='08'||month='09')THENsetseason='3'; endif; if(month='10'||month='11'||month='12')THENsetseason='4'; endif; updatet_industry_finance_instancesetseasonseason_=seasonwhereID_=id; FETCHcur1INTOid,month; ENDWHILE; CLOSEcur1; END;// DELIMITER; callupdateCursor();
原文链接:https://77isp.com/post/4299.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态