存储过程创建失败
CREATE PROCEDURE sp_select_filter(IN sp_name VARCHAR)
-> BEGIN
-> IF sp_name IS NULL OR sp_name = '' THEN
-> SELECT * FROM imooc_goddess;
-> ELSE IF LENGTH(sp_name) = 11 AND SUBSTRING(sp_name,1,1) = 1 THEN
-> SELECT * FROM imooc_goddess WHERE mobile = sp_name;
-> ELSE SELECT * FROM imooc_goddess WHERE user_name LIKE CONCAT('%',sp_name,'%');
-> END IF;
-> END IF;
-> END
一直提示错误,请哪位帮忙看看?