无法在mysql中创建存储过程

问题描述 投票:0回答:1

我试图在mysql中创建存储过程,但显示以下错误..

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6

程序如下..

CREATE PROCEDURE getSchools( IN masterschools_id int )
BEGIN
 select * from masterschools where id =masterschools_id;
END
mysql stored-procedures
1个回答
0
投票

试过这个并且它正常工作......

 create DEFINER=products@localhost procedure getMyschools ()
  NOT DETERMINISTIC NO SQL SQL SECURITY DEFINER
select * from masterschools;
© www.soinside.com 2019 - 2024. All rights reserved.