MySQL CRÉER Syntaxe de la FONCTION

Je suis en train de créer une fonction MySQL:

Voici le code SQL:

CREATE FUNCTION F_Dist3D (x1 decimal, y1 decimal) 
RETURNS decimal
DETERMINISTIC
BEGIN 
 DECLARE dist decimal;
 SET dist = SQRT(x1 - y1);
 RETURN dist;
END;

J'obtiens l'erreur suivante:

#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 '' at line 10

Je suis en cours d'exécution de cette instruction create dans phpMyAdmin. Quel est le problème avec cette fonction?

InformationsquelleAutor Mel | 2011-07-19