请帮助我,我想创建程序,但发现这样的错误
CREATE PROCEDURE studentAddOrEdit(
IN _id INT,
IN _firstname VARCHAR(191),
IN _lastname VARCHAR(191)
)
BEGIN
IF _id = 0 THEN
INSERT INTO students(firstname, lastname) VALUES(_firstname,_lastname);
SET _id = LAST_INSERT_ID();
ELSE
UPDATE
students
SET
firstname = _firstname, lastname = _lastname
WHERE
id = _id;
END IF;
SELECT
id AS _id
END
现在它说
#1064-您的SQL语法有错误;检查与您的MariaDB服务器版本相对应的手册以获取正确的语法,以在第7行的''附近使用