Jump to content

SHOW FUNCTION STATUS


gjking

Recommended Posts

Hellllo there,

I want to create stored functions. I checked out the MySQL manual how to do this. But in the process of doing this I wanted to get a list with info of all these stored functions

The manual says this can be done with "SHOW FUNCTION STATUS"

However this does not work...I tried it by executing this query from 3 places:
PHPMyAdmin
direct in the command line
from a php script which I've written myself

I use MySQL version 4.1.10a-nt


I also have problems creating a stored function...I tried the following example (from the command line):

[code]
delimiter ||

CREATE FUNCTION WEIGHTED_AVERAGE (n1 INT, n2 INT, n3 INT, n4 INT)
  RETURNS INT
   DETERMINISTIC
    BEGIN
     DECLARE avg INT;
     SET avg = (n1+n2+n3*2+n4*4)/8;
     RETURN avg;
    END||
[/code]


But I get the following error:

[code]
ERROR 1064 (42000): 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 '(n1 I
NT, n2 INT, n3 INT, n4 INT)
  RETURNS INT
   DETERMINISTIC
    BEGIN
     D' at line 1
[/code]

Hope someone can help me out....

Best wishes,

GJ
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.