Monday, April 16, 2012

Re: CREATE MySQL PROCEDURE

If by "SQL Prompt", you mean the prompt in the console, note that it's a very limited tool, and isn't intended for doing complex operations / queries. I believe it doesn't support delimiter, for one thing.

Instead, try using the command line sql commandline tool:


Thanks,
Brian

On Sun, Apr 15, 2012 at 11:44 PM, JK Winkler <jsmith27182@gmail.com> wrote:
I even stripped the code down to this:


create procedure mak_nums
begin

   insert into Tmp_Elements (Cell, n, k) values (1,2,2);

end;

And I get the error:

Error 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 'begin    insert into Tmp_Elements (Cell, n, k) values (1,2,2); end' at line 2

I verified the SQL insert statement does work by itself.

No comments:

Post a Comment