List:General Discussion« Previous MessageNext Message »
From:Dan Baker Date:September 1 2005 11:29pm
Subject: Stored function
View as plain text  
I'm running "MySQL 4.0.23-standard", and trying to create a stored function. 
Am I doing something wrong, or can I not create a stored function in 4.0.23? 
What I want is a stored function to take an int from a column and alter it 
(mask off the low 16-bits).

SQL-query :
CREATE FUNCTION hello(
s CHAR( 20 )
) RETURNS CHAR( 50 ) RETURN CONCAT( 'Hello, ', s, '!' )

MySQL said:

#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 
'( s CHAR( 20  )  ) RETURNS CHAR( 50  )  RETURN CONCAT(  'Hello,

Thanks
DanB



Thread
Stored functionDan Baker2 Sep
  • Re: Stored functionMartijn Tonies2 Sep