MySQL Forums
Forum List  »  Stored Procedures

Re: Declare variable inside a function
Posted by: Dedi Mulyana
Date: December 28, 2008 11:49PM

Try This

DELIMITER $$

DROP FUNCTION IF EXISTS fn_GetYearAlbumRank $$
CREATE FUNCTION fn_GetYearAlbumRank(parmAlbumID INT, parmYear INT) RETURNS INT
BEGIN
DECLARE retval INT;
SELECT 5 INTO retval;
RETURN retval;
END $$

DELIMITER ;

i hope its help ...

Regs,

Dedi Mulyana
R & D Vgen Studio

Options: ReplyQuote


Subject
Views
Written By
Posted
57851
June 14, 2007 02:06AM
Re: Declare variable inside a function
6668
December 28, 2008 11:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.