KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a stored procedure which does not need to return any values. It runs smoothly and without any problem. However, it outputs an error message after finishing its run: Error: No data - zero rows fetched, selected, or processed How can I get rid of this error message? CREATE PROCEDURE `testing_proc`() READS SQL DATA BEGIN DECLARE done INT DEFAULT 0; DECLARE l_name VARCHAR(20); DECLARE my_cur CURSOR FOR SELECT name FROM customer_tbl; OPEN my_cur; my_cur_loop: LOOP FETCH my_cur INTO l_name; IF done = 1 THEN LEAVE my_cur_loop; END IF; INSERT INTO names_tbl VALUES(l_name); END LOOP my_cur_loop; CLOSE my_cur; END
Tags (comma-separated)
Save Edits
Cancel