Question

I'm currently coding somewhat on MySQL and got a FUNCTION. For me the code looks fine, but MySQL throws a

Error Code: 1415 Not allowed to return a result set from a function Error.

Function: Cick here, pastebin.com

As i said, i dont see any syntax error in it and simply cant understand why its throwing an Error. Only on execution though, creates without any problems.

I googled already, and haven't found anything helping my on this, so i hope you can. Thanks in advice.

Was it helpful?

Solution

I replaced all the other functions referenced in your new function with ROUND(RAND()) and it ran fine; Could it be that one of those functions might be trying to return a result set?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top