Hi I am generally an oracle guy trying to try my hands in MySql. I have understood the basic concepts and now trying to develop functions. while doing so facing a problem as below.I apologise if this be the silliest question in entire Stackoverflow, but I am at my wits endMy code :
DELIMITER $$CREATE FUNCTION test1 returns int (11)beginDECLARE id int(11) default 3;return id;end;$$delimiter ;
I am getting the below error while trying to create the above function
12:35:59 CREATE FUNCTION test1 returns int (11) begin DECLARE myid int(11) default 3; return myid; end; 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 '(11) begin DECLARE myid int(11) default 3; return myid; end' at line 1 0.000 sec