Mysql 程序中的if语句有什么问题?
编写sql过程很简单Mysql 程序中的if语句有什么问题?,mysql,mariadb,procedure,Mysql,Mariadb,Procedure,编写sql过程很简单 demiliter // create procedure show_growth() begin SELECT * from tb; end // 我想在过程中添加if语句。 先放下它 drop procedure show_growth // 然后创建一个新的 create procedure show_growth(in type char(3)) -> begin -> if type = "all" then ->
demiliter //
create procedure show_growth()
begin
SELECT * from tb;
end //
我想在过程中添加if语句。先放下它
drop procedure show_growth //
然后创建一个新的
create procedure show_growth(in type char(3))
-> begin
-> if type = "all" then
-> SELECT * from tb;
-> endif
-> end //
错误1064(42000):您的SQL语法有错误;检查与您的MariaDB服务器版本对应的手册,以了解第6行“end”附近要使用的正确语法
如何修复它?
endif
不是一个单词
begin
if type = "all" then
SELECT * from tb;
end if;
end
我不熟悉mariadb,但我认为这是一个缺失的
。