Cannot create function in MySQL

514 views Asked by At

I cannot add custom function to my MySql database, I have problems even with simple function like this

DELIMITER $$
DROP FUNCTION IF EXISTS `foo`$$
CREATE FUNCTION `foo`(IN doWork boolean) RETURNS boolean
    NO SQL
    DETERMINISTIC
BEGIN
  return doWork;

END%%
DELIMITER ;

when I execute above query , phpmyadmin show that all is ok, but when I want to call this function phpmyadmin say's that cannot find this function, also table ROUTINES in information_schema dont contains it.

1

There are 1 answers

0
juergen d On

your end delimiter is different from the defined one

replace

END%%

with

END $$