CREATE FUNCTION count(name varchar(20))
RETURNS integer
BEGIN
DECLARE d_count integer;
select count(*) into d_count
from ins
where ins.name = name
RETURN d_count;
END
上面的 SQL 代码显示存在语法错误。
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 'RETURN (d_count); END' at line 8
任何想法如何解决它?