我试图为mysql表创建DELETE存储过程。查询运行并显示查询成功,但当我尝试在'例程中查看存储过程时,它不会显示DELETE存储过程。这是我创建存储过程的代码
DELIMITER //
CREATE PROCEDURE sp_AccessLevel_Delete(IN id INT)
BEGIN
DELETE AccessLevel
WHERE AccessLevelID = id;
END
//
DELIMITER ;
我该怎么做才能解决这个问题?
答案 0 :(得分:0)
@siyual:把它放在这里,因为它不适合评论:
[test]> delete foo where bar=2;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where bar=2' at line 1
[test]> delete foo;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
[test]> delete from foo;
Query OK, 1 row affected (0.00 sec)