无法在mysql中创建存储过程 [英] Not able to create stored procedure in mysql

查看:43
本文介绍了无法在mysql中创建存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

<块引用>

1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以获取在第 6 行 '' 附近使用的正确语法

程序如下..

CREATE PROCEDURE getSchools( IN masterschools_id int )开始select * from masterschools where id = masterschools_id;结尾

解决方案

试过了,效果很好...

 创建 DEFINER=products@localhost 程序 getMyschools()NOT DETERMINISTIC NO SQL SQL 安全定义器从大师学校中选择*;

I am trying to create stored procedure in mysql but showing following errors..

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

Procedure as bellow..

CREATE PROCEDURE getSchools( IN masterschools_id int )
BEGIN
 select * from masterschools where id =masterschools_id;
END

解决方案

Tried this and its working properly...

 create DEFINER=products@localhost procedure getMyschools ()
  NOT DETERMINISTIC NO SQL SQL SECURITY DEFINER
select * from masterschools;

这篇关于无法在mysql中创建存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆