Posts

Showing posts with the label Example of Cursor in Mysql

Example of Cursor in Mysql

DELIMITER //   CREATE PROCEDURE myone()   BEGIN                 declare myno   int(3);      DECLARE done INT DEFAULT FALSE;                 declare mycursor CURSOR for   select roll_no from fine;          DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;          open mycursor;       Label1 : LOOP                                 fetch mycursor into   myno;                           ...