mysql已经创建了一个存储过程,要修改,但是语句有错,不知道哪里错了
DELIMITER$$ALTERPROCEDURE`wenxionline`.`sp_student`()BEGINDECLAREStuNoCHAR(4);DECLARE...
DELIMITER $$
ALTER
PROCEDURE `wenxionline`.`sp_student`()
BEGIN
DECLARE StuNo CHAR(4);
DECLARE StuName VARCHAR(20);
DECLARE Age INT;
DECLARE Sex BOOL;
SELECT * FROM students;
END$$
DELIMITER ; 展开
ALTER
PROCEDURE `wenxionline`.`sp_student`()
BEGIN
DECLARE StuNo CHAR(4);
DECLARE StuName VARCHAR(20);
DECLARE Age INT;
DECLARE Sex BOOL;
SELECT * FROM students;
END$$
DELIMITER ; 展开
2个回答
展开全部
ALTER PROCEDURE proc_name [characteristic ...]
characteristic:
{ CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'
This statement can be used to change the characteristics of a stored procedure. More than one change may be specified in an ALTER PROCEDURE statement. However, you cannot change the parameters or body of a stored procedure using this statement; to make such changes, you must drop and re-create the procedure using DROP PROCEDURE and CREATE PROCEDURE.
就是说只能改名字和定义不能改里面的内容。要删了重新建。
characteristic:
{ CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'
This statement can be used to change the characteristics of a stored procedure. More than one change may be specified in an ALTER PROCEDURE statement. However, you cannot change the parameters or body of a stored procedure using this statement; to make such changes, you must drop and re-create the procedure using DROP PROCEDURE and CREATE PROCEDURE.
就是说只能改名字和定义不能改里面的内容。要删了重新建。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询