• Register
0 votes
133 views

Problem  :

I have a Stored procedure like below:

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

But it gives me the below error:

#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

What does this error mean? What is wrong with my line number 2?

3.9k points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

You have to change the delimiter before using the triggers, stored procedures and so on as shown below .

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

OR

Guide to find out what your MySQL Error is trying to say as below:

#1064 - You have an error in your SQL syntax;

Above error has no clues in it. So you have to double check all of your items to see where the mistake is:

1. You must have either omitted, or included an unnecessary symbol: !@#$%^&*()-_=+[]{}\|;:'",<>/?

2. You must have included a misplaced, missing or unnecessary keyword: select, into, or  the countless others.

3. You must have unicode characters that look like ascii characters in the query but are not recognized.

4. Misplaced, missing or the unnecessary whitespace or a newlines between keywords.

Remove as much as you can from your broken query until it starts working. And then use PostgreSQL next time that has a sane syntax reporting system.

38.6k points

Related questions

0 votes
1 answer 47 views
47 views
Problem: What am I purported to do with this problem? >Check the manual that corresponds to your mysql server version.
asked May 7 Ashok Dileep 21.5k points
0 votes
1 answer 11 views
11 views
Problem: Please, somebody, assist me : Sql error (1064): you have an error in your sql syntax
asked Jun 25 nila 121k points
1 vote
1 answer 96 views
96 views
Problem: I am getting the following error: Error 1064 (42000): you have an error in your sql syntax;
asked Apr 29 PkGuy 25.9k points
1 vote
1 answer 71 views
71 views
Problem: How to fix this error. Sqlstate[42000]: syntax error or access violation: 1064 you have an error in your sql syntax.
asked Apr 18 PkGuy 25.9k points
0 votes
1 answer 597 views
597 views
Problem : I am very new to the php and I am trying from long time but I cannot sort out the issue with my below code. Please let me know how can I fix the error? "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 ' '0')' at line 1"
asked Feb 3, 2020 jwilliam 3.9k points
0 votes
0 answers 17 views
17 views
500 Error: ER_PARSE_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 ''Test' ORDER BY Id LIMIT 1' at line 1 #6221 Steps to reproduce 1: Make an object property in the ... to type 'object | undefined'.ts(2322)" } } }) Current Behavior Gives 500 error. Expected Behavior Should find the desired record.
asked May 26 Yash verma 4k points
0 votes
1 answer 22 views
22 views
Problem: it outputs the error: Syntax error or access violation: 1064 No idea how to fix this. any ideas?
asked Mar 22 ummesalma 29.1k points
0 votes
1 answer 7 views
7 views
Problem: Mysql (MariaDB) is an example of the
asked 2 days ago Sawyer Parviz 168k points
0 votes
1 answer 52 views
52 views
Problem: mysql is not recognized as an internal or external command.
asked Feb 18 charles mathews 5.5k points
0 votes
2 answers 393 views
393 views
Problem : Facing following mysql path error 'mysql' is not recognized as an internal or external command, operable program or batch file.
asked Nov 14, 2019 peterlaw 6.9k points