저장된 mysql 함수를 만드는 데 문제가 있습니다. 우선 공식 튜토리얼 다음 그것을 아주 쉽게 만들려고 다음 선택 쿼리 자체와 "mangd"에 의해 잘 작동 http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html내 mysql 함수가 작동하지 않습니까?
create function bestalldavaror_7()
RETURNS int DETERMINISTIC
RETURN select sum(mangd) from bestalln where artikel_id = 7;
의 int이다 (11) 값 (그래서 테이블의 모든 것이) . 왜이 오류가 발생 않습니다
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 'select sum(mangd) from bestalln where artikel_id = 7' at line 3
테이블 구조를 게시 할 수 있습니까? – Tom