CREATE for Stored Proc fails

charlieo's profile image charlieo posted 10 years ago in General Permalink
Hi,

I've noticed this for a while: If I want to create a copy of a stored procedure, I have tried to copy the CREATE code for the SP and then run that with a changed name. However, when I do this, MySQL always complains that I have an error in the code. Anyone else experience this?

Thanks,
Charlie
ansgar's profile image ansgar posted 10 years ago Permalink
You have to set the delimiter to something different than semicolon:
DELIMITER \\
CREATE procedure whatever...
DELIMITER ;


Or, use HeidiSQL's SQL export dialog to export your procedure to another database, another server, to a .sql file or to your clipboard.

Please login to leave a reply, or register at first.