Click here to Skip to main content
12,292,006 members (72,508 online)
Rate this:
 
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ő 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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2016
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