I want to define a MySQL stored procedure, which returns data in the result set. Sometimes, I want to return nothing (ie, zero rows).
How can I do this? SELECT;
is invalid, and SELECT NULL;
returns a record with a NULL value. How to select an empty set?