MySQL错误:您的SQL语法有错误;查看与您的MySQL服务器版本相对应的手册,以在附近使用正确的语法 [英] MySQL error: 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

查看:1600
本文介绍了MySQL错误:您的SQL语法有错误;查看与您的MySQL服务器版本相对应的手册,以在附近使用正确的语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的存储过程:

CREATE PROCEDURE ProG()
  BEGIN
    SELECT * FROM `hs_hr_employee_leave_quota`;
  END

但是它给出了错误:

#1064-您的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册,以获取在第3行

#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 3

错误是什么意思?第2行有什么问题?

What does the error mean? What is wrong with line number 2?

推荐答案

使用触发器,存储过程等之前,您必须更改定界符.

You have to change delimiter before using triggers, stored procedures and so on.

delimiter //
create procedure ProG() 
begin 
SELECT * FROM hs_hr_employee_leave_quota;
end;//
delimiter ;

这篇关于MySQL错误:您的SQL语法有错误;查看与您的MySQL服务器版本相对应的手册,以在附近使用正确的语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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