Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MySQL
Hi all,
 
I am using the MySql Server Veersion: 5.0.77 in phpmyadmin
my procedure syntax is like
 
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 30-Dec-12 20:56pm
Comments
Zoltán Zörgő at 31-Dec-12 2:59am
   
And have you checked the documentation?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx[^]
 
Don't forget the delimiter!
 
DELIMITER //
CREATE PROCEDURE SP_GET_ALLJOBIDS()
  BEGIN
  select * from jobdetails;
  END //
DELIMITER ;
  Permalink  
v2
Comments
Santhosh23 at 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ő at 31-Dec-12 3:16am
   
Well, that's an other error: #1044 - Access denied for user '***'@'216.178.92.138' to database '****'.
Santhosh23 at 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ő at 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)

  Print Answers RSS
0 Maciej Los 450
1 OriginalGriff 403
2 Sergey Alexandrovich Kryukov 199
3 CPallini 189
4 CHill60 180
0 OriginalGriff 6,092
1 Sergey Alexandrovich Kryukov 4,972
2 Maciej Los 3,269
3 Peter Leow 3,129
4 DamithSL 2,490


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100