创建存储过程失败,代码如下,怎么回事啊?
输的没错啊 和老师的
输的没错啊 和老师的
2016-10-18
CREATE PROCEDURE sp_select_filter(IN sp_name VARCHAR(20)) -> 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 改成这样了 都不行 哪错了?
举报