- Cursor
create or replace PROCEDURE SP_CURSOR_EXAMPLE1 AS /**************************************************************** NAME: SP_CURSOR_EXAMPLE1 PURPOSE: Example for looping records in a cursor. ****************************************************************/ CURSOR c_products IS SELECT PRODUCT_CD FROM TBL_PRODUCT ORDER BY PRODUCT_CD; BEGIN FOR r_proudct IN c_products LOOP dbms_output.put_line(r_proudct.PRODUCT_CD); END LOOP; END;
No comments:
Post a Comment