MySQL Forums
Forum List  »  Stored Procedures

Create function gets error no matter what
Posted by: Joel Carlson
Date: August 26, 2013 12:58PM

I boiled this down to a a few statements:
CREATE FUNCTION Hierarchy_Agent(value INT)
RETURNS INT
NOT DETERMINISTIC READS SQL DATA
BEGIN
DECLARE xid INT;
END
result:
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 5

line 5 is the declare statement... I think.
What gives? Every source I check verifies correct syntax.
I'm originally SQL Server... only recently beginning with mySQL.
version is '5.1.66-0+squeeze1'



Edited 1 time(s). Last edit at 08/26/2013 01:00PM by Joel Carlson.

Options: ReplyQuote


Subject
Views
Written By
Posted
Create function gets error no matter what
2041
August 26, 2013 12:58PM


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.