function MySQL does not exist
I'm creating my first function, with the following code:
CREATE FUNCTION CTRLPRODUCAO.COMPARATOTAIS (AG INT, P 开发者_开发百科INT, ANO INT)
RETURNS BOOLEAN DETERMINISTIC
BEGIN
(...)
END
When I run the command, received the return of the Workbench: "0 row (s) affected". Is it ok?
When I run SELECT CTRLPRODUCAO.COMPARATOTAIS (1, 9, 2011) AS TEST;
I get
"Error Code: 1305 FUNCTION CTRLPRODUCAO.COMPARATOTAIS does not exist"
What am I doing wrong?
You can't insert a . in your function name.
As far as i know, in MySQL, the . is interpeted as a kind of join and in your example, MySQL is looking for the function COMPARATOTAIS in CTRLPRODUCAO table.
精彩评论