At 9:10 AM -0800 3/6/08, puntapari wrote:
Somethin like this?DELIMITER $$ DROP PROCEDURE IF EXISTS `cantidad` $$ CREATE PROCEDURE `cantidad` (in n int ) for i in 0..n loop insert into temp values(i); end loop; select * from temp; END $$ DELIMITER ;
Not quite. This will still return the result set to the client. So, don't select from the table in the procedure. Use the procedure to populate the table, and then use your original query, with the originally proposed stored function reference replaced with a reference to the table that contains 0 ... n. -- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
