您好,欢迎来到调星娱乐。
搜索
您的当前位置:首页Mysql中存储过程ifelse的问题简析_MySQL

Mysql中存储过程ifelse的问题简析_MySQL

来源:调星娱乐


bitsCN.com
以下这样写会报错:
[Error] 10 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end if' at line 8 create procedure test(in a int) if a > 1 then select 1; elseif a>2 then select 2; else end if; [xhtml]create procedure test(in a int) if a > 1 then select 1; elseif a>2 then select 2; else end if; 应改成以下这样: create procedure test(in a int) if a > 1 then select 1; elseif a>2 then select 2; else -- do nothing -- set @tmp=1; end if; 作者 zhu473105308 bitsCN.com

Copyright © 2019- dxga.cn 版权所有 湘ICP备2023023988号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务