Home » Open Source » MySQL » MySQL Procedure not getting compiled (MySQL Version 5.5)
MySQL Procedure not getting compiled [message #620144] Tue, 29 July 2014 07:58 Go to next message
s4.ora
Messages: 71
Registered: March 2010
Member
Hi All,

I am trying to create a Procedure in MySQL but it is not getting compiled. I have used a simple Code to test it.

CREATE PROCEDURE curdemo
BEGIN

  DECLARE a CHAR(16);
  DECLARE b, c INT;

END;


I am getting the below error


mysql> \. /home/esuvsen/Desktop/TAG Allignment/TEST.sql
ERROR 1064 (42000): 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 'BEGIN

DECLARE a CHAR(16);
DECLARE b, c INT;

END' at line 2

I have also changed to Delimiter to // using the below command at the MySQL Prompt

Delimiter //

Please help..
Re: MySQL Procedure not getting compiled [message #620148 is a reply to message #620144] Tue, 29 July 2014 08:07 Go to previous message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Isn't it necessary to have at least a statement between BEGIN-END block?
Previous Topic: access and mysql: cascading insert into query problem
Next Topic: MySQL Cluster 5.4
Goto Forum:
  


Current Time: Thu Mar 28 05:11:38 CDT 2024