Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am using the MySql Server Veersion: 5.0.77 in phpmyadmin
my procedure syntax is like

SQL
CREATE  PROCEDURE `SP_GET_ALLJOBIDS`()
BEGIN
       select * from jobdetails  ;
END


but after click on go button show the error is like

SQL query: Documentation

CREATE PROCEDURE `SP_GET_ALLJOBIDS` ( ) BEGIN SELECT *
FROM jobdetails;

MySQL said: Documentation
#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

how to solve the error, please help me..

thanks
Posted
Comments
Zoltán Zörgő 31-Dec-12 2:59am    
And have you checked the documentation?

1 solution

http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx[^]

Don't forget the delimiter!

SQL
DELIMITER //
CREATE PROCEDURE SP_GET_ALLJOBIDS()
  BEGIN
  select * from jobdetails;
  END //
DELIMITER ;
 
Share this answer
 
v2
Comments
Santhosh23 31-Dec-12 3:10am    
thanks for your replay..
i am modified the my procedure but i got the error
DELIMITER //
CREATE PROCEDURE `SP_GET_ALLJOBIDS`()
BEGIN
select * from jobdetails ;
END //
DELIMITER ;

Error is:

DELIMITER //
CREATE PROCEDURE `SP_GET_ALLJOBIDS`()
BEGIN
select * from jobdetails ;
END //


SQL query: Documentation

DELIMITER // CREATE PROCEDURE `SP_GET_ALLJOBIDS`() BEGIN select * from jobdetails ; END //

MySQL said: Documentation
#1044 - Access denied for user '***'@'216.178.92.138' to database '****'
Zoltán Zörgő 31-Dec-12 3:16am    
Well, that's an other error: #1044 - Access denied for user '***'@'216.178.92.138' to database '****'.
Santhosh23 31-Dec-12 3:25am    
am using versions in phpmyadmin Server version: 5.0.77 ,Protocol version: 10,
Server: mysql2.netcarrier.com via TCP/IP

phpMyAdmin - 2.11.8.1,
MySQL client version: 5.0.51a
Used PHP extensions: mysql

any problem for my versions.. please help me
Zoltán Zörgő 31-Dec-12 3:39am    
Look here: http://forums.mysql.com/read.php?98,243886,243961#msg-243961
You don't have enough privileges. Try to ask from the provider...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900