I have trouble creating a function using phpMyAdmin like an interface for MySQL. So I write:
DELIMITER //
Create or Replace Function affecter (id_patient IN integer , id_maladie IN VARCHAR2 )
Return VARCHAR2(30) IS msg Varchar2(30);
Begin
Insert into souffrir values (id_patient,id_maladie);
msg:= 'Insertion effectuée';
Return msg;
END//
I get this error:
#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 'Function affecter (id_patient IN integer , id_maladie IN VARCHAR2 ) Returns V' at line 1
How do I fix this error?