How to loop through a table using a cursor in MySQL?
I have following table in my database and I wrote following stored procedure to loop through the table. When I call this stored procedure, I get only one record. What could be the error I have done, and how can this be fixed? +--------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+--------------+------+-----+---------+-------+ | date | date | NO | | NULL | | | inQty | decimal(5,2) | NO | | 0.00 | | | outQty | varchar(45) | YES | | 0.0 | | +--------+--------------+------+-----+---------+-------+ -- --------------------------------------