MySQL Forums
Forum List  »  Stored Procedures

Re: How to return null/empty resultset from SP??
Posted by: Per-Erik Martin
Date: December 13, 2005 07:39AM

SELECT x;

where x is a variable or a value (possibly NULL), will always return a result set consisting of exactly one row.

You can force an empty result set by using the "dummy" table DUAL: SELECT 1 FROM DUAL WHERE false;

pem, Senior Software Dev., MySQL AB



Edited 1 time(s). Last edit at 12/13/2005 07:41AM by Per-Erik Martin.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to return null/empty resultset from SP??
2452
December 13, 2005 07:39AM


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.