5 messages in com.mysql.lists.javaRE: DECLARE in stored procedure for M...| From | Sent On | Attachments |
|---|---|---|
| Igor Dayen | 11 Apr 2004 11:59 | |
| Rubin, Shari | 11 Apr 2004 15:52 | |
| Igor Dayen | 11 Apr 2004 20:07 | |
| Rubin, Shari | 11 Apr 2004 20:12 | |
| Igor Dayen | 11 Apr 2004 21:05 |
| Subject: | RE: DECLARE in stored procedure for MySQL 5.0![]() |
|---|---|
| From: | Rubin, Shari (shar...@attws.com) |
| Date: | 04/11/2004 08:12:11 PM |
| List: | com.mysql.lists.java |
Sorry, I spelled "delimiter" wrong. You can find a complete example here ...
http://dev.mysql.com/doc/mysql/en/CREATE_PROCEDURE.html
-----Original Message----- From: Igor Dayen [mailto:in...@objcentric.com] Sent: Sunday, April 11, 2004 8:08 PM To: Rubin, Shari; ja...@lists.mysql.com Subject: Re: DECLARE in stored procedure for MySQL 5.0
Thank you, Shari. It yielded however the same negative results:
mysql> delimeter | -> create procedure abc() -> begin -> declare x int| /* declare x int; does not make a difference */ -> end| -> delimeter ; 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 'deli
Any ideas how to overcome this?
----- Original Message ----- From: "Rubin, Shari" <shar...@attws.com> To: "Igor Dayen" <in...@objcentric.com>; <ja...@lists.mysql.com> Sent: Sunday, April 11, 2004 6:53 PM Subject: RE: DECLARE in stored procedure for MySQL 5.0
You need to change the statement delimiter from ";" to another character before creating the procedure. For example change the delimiter to "|".
delimiter | create procedure abc() begin declare x int; end |
delimiter ;
-----Original Message----- From: Igor Dayen [mailto:in...@objcentric.com] Sent: Sunday, April 11, 2004 12:00 PM To: ja...@lists.mysql.com Subject: DECLARE in stored procedure for MySQL 5.0
Hello,
I would appreciate if I get advice on a problem with using DECLARE var in stored procedure for 5.0.0. Please, see log below. Thanks. ==========================================
C:\mysql500\bin>mysql --version mysql Ver 14.3 Distrib 5.0.0-alpha, for Win95/Win98 (i32)
C:\mysql500\bin>mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 5.0.0-alpha-max-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create procedure abc() -> begin -> declare x int; 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 '' at line 3




