MySQL Forums
Forum List  »  Stored Procedures

Declare statement causing error 1064
Posted by: Rinaldo Clucher
Date: November 25, 2018 06:12AM

Hi Folks,

I have installed 8.0.13 MySQL Community Server - GPL
I have been trying to create the simplest stored procedure with a Declare variable but am getting a 1064 error when I add the declare variable. I am also getting the same error when entering the same same sql in the CLI using delimiters. Can someone tell me what I am doing wrong? The reference suggest this syntax should be correct.


use RCData;
drop procedure if exists UpdateProductConfiguration;
CREATE PROCEDURE UpdateProductConfiguration()
declare v_pcid varchar(20);


CREATE PROCEDURE UpdateProductConfiguration () BEGIN DECLARE v_pcid VARCHAR(20) Error Code: 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 4 0.015 sec

Options: ReplyQuote

Written By
Declare statement causing error 1064
November 25, 2018 06:12AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.