> 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 function | Dan Baker | 2 Sep |
| • Re: Stored function | Martijn Tonies | 2 Sep |