MySQL Forums
Forum List  »  Stored Procedures

Re: Returning a signle result set
Posted by: Per-Erik Martin
Date: December 15, 2005 06:42AM

Aha, but this is different from your first example.

You have two selects in the code:

SELECT varA;

and

SELECT FALSE AS result; -- or TRUE

so of course you get two result sets. If you want only one result set, just return one result set. :-)

Btw, the if-statement should have this test: ISNULL(varA)
More efficient than using a subselect.

pem, Senior Software Dev., MySQL AB

Options: ReplyQuote


Subject
Views
Written By
Posted
2196
December 15, 2005 05:01AM
1361
December 15, 2005 05:41AM
1448
December 15, 2005 05:51AM
Re: Returning a signle result set
1445
December 15, 2005 06:42AM


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.