MySQL function does not exist

I create my first function with the following code:

CREATE FUNCTION CTRLPRODUCAO.COMPARATOTAIS (AG INT, P INT, ANO INT) RETURNS BOOLEAN DETERMINISTIC BEGIN (...) END 

When I ran the command, I received a Workbench return: "0 lines were affected." This is normal?

When I run SELECT CTRLPRODUCAO.COMPARATOTAIS (1, 9, 2011) AS TEST;

I get

"Error code: 1305 CTRLPRODUCAO.COMPARATOTAIS FUNCTION does not exist"

What am I doing wrong?

+4
source share
1 answer

You cannot insert a. in the name of your function.

As far as I know, in MySQL. interpreted as a kind of join, and in your example, MySQL looks for the COMPARATOTAIS function in the CTRLPRODUCAO table.

+4
source

All Articles