From: Martijn Tonies Date: September 2 2005 6:20am Subject: Re: Stored function List-Archive: http://lists.mysql.com/mysql/188601 Message-Id: <00a001c5af86$7bc6c5f0$3802a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > 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