MySQL Forums
Forum List  »  Stored Procedures

Re: How to use a stored procedure in a select structure?
Posted by: Andrew Gilfrin
Date: November 17, 2005 09:52AM

Jay Pipes wrote:

> To strip a little flesh from the meat ( ;) ), I
> would add that MySQL does indeed know whether a
> SQL statement will return one or no rows versus
> more than one row.

Bad choice of words on my part maybe, I think what I should have said, given that MySQL knows that procedures could return more than one row it doesn't even bother to check in that context,it just says no thanks to procedures from with SQL. There realistically isn't anything you can do in a procedure you can't do in function, because of this there is no benefit writing code in a procedure over a function when you want to call it from SQL.

Because a function always returns one, only one and always one value MySQL doesn't have to concern itself with checking whats coming out.

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote




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.