MySQL function return more than 1 row
- by bobobobo
I'd like to write a MySQL stored function that returns multiple rows of data. Is this possible? It seems to be locked at 1 row -- can't even return 0 rows.
For example
DELIMITER //
create function go()
RETURNS int
deterministic
NO SQL
BEGIN
return null ; -- this doesn't return 0 rows! it returns 1 row
-- return 0 ;
END //
DELIMITER ;
Returning null from a MySQL stored proc though, doesn't return 0 rows.. it returns 1 row with the value null in it.
Can I return 0, or more than 1 row from a MySQL function, how?