the function is this:
delimiter |
create function average() returns int
begin
declare AB int;
set AB= avg(attribute1) from tablename where attribute2='AMG' ;
return AB;
end;
|
ERROR No query specified
What i do wrong?