The critical understanding of Associate cursor is as follows. The concept is used while retrieving a cursor from a stored procedure and you need to have ASSOCIATE in your calling stored procedure.
Create Procedure example..
CREATE PROCEDURE EMP_NAME (OUT p_name VARCHAR(30)) BEGIN DECLARE result RESULT_SET_LOCATOR VARYING; -- Call the procedure returning the result set CALL emp(); -- Get a cursor for the result set ASSOCIATE RESULT SET LOCATOR (result) WITH PROCEDURE emp; ALLOCATE cur CURSOR FOR RESULT SET result; -- Cursor already open, so you can start fetching rows FETCH cur INTO p_name; -- ... CLOSE cur; END
- C programming top examples for Campus recruitment
- Machine learning tools read now popular in the market
- Resources you need to practice MySQL online
- 4 top Agile Tutorials for Certification
- 5 Top Skills Without Certification You can increase your Market Value