MySQL Forums
Forum List  »  Stored Procedures

Re: Silent stored procedure
Posted by: Roland Bouman
Date: December 16, 2005 03:56AM

No, you can't supress it. I wouldn't know about the mem issue.
Are you aware of the SELECT INTO syntax? You see, this would solve it alltoghether.

create procedure myproc(
OUT p_maxLocalizationId int unsigned
)
begin

SELECT max(idLocalization)
INTO p_maxLocalizationId
FROM localization
;

end;

Now, you select the return value of max into a user variable (@maxId). It would be better to do this with a regular OUT parameter. That way, you can see immediately just by looking at the procedure's signature that it provides a value for maxid. I made that modification already in the snippet

Options: ReplyQuote


Subject
Views
Written By
Posted
3065
December 16, 2005 03:43AM
Re: Silent stored procedure
2612
December 16, 2005 03:56AM
1545
December 16, 2005 04:14AM
1658
December 16, 2005 04:24AM
1501
December 16, 2005 04:14AM
1920
December 16, 2005 04:19AM
1546
December 16, 2005 06:17AM


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.