List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:September 2 2005 6:20am
Subject:Re: 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,

Stored Procedures, Functions, Triggers and Views are supported in
MySQL 5.


-- 
With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

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