我想在MySQL中建立一個函數使用「」附近正確語法手冊:你的SQL語法有錯誤;檢查對應於你的MySQL服務器版本在22行
下面是SQL代碼:
DELIMITER //
CREATE FUNCTION hranisez_wp.calcBMI
(
cPol varchar,
dPregled datetime,
dRodjen datetime,
nVisina double,
nTezina double;
)
returns varchar(4000)
begin
declare nBMI double;
declare nStarost double;
declare cBMIText varchar(100);
declare nPothranjen double;
declare nMrsav double;
declare nNormalan double;
declare nGojazan double;
declare nPrekomjeran double;
declare nMinTezina double;
declare nMaxTezina double;
declare exit handler for sqlexception begin return(null);
end
//
DELIMITER ;
我一直得到這個錯誤:
#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 ' dPregled datetime, dRodjen datetime, nVisina double, nTez' at line 3
請幫忙!
StackOverflow不是一個調試服務。閱讀錯誤消息,其中包含解決問題所需的信息。 – Pred