Write PL/SQL Program For Exception Of CURSOR_ALREADY_OPEN

Q. Write PL/SQL Block For Exception Of  CURSOR_ALREADY_OPEN.

Output:

DECLARE
	CURSOR emp_cur IS SELECT * FROM emp;
BEGIN
OPEN emp_cur;
OPEN emp_cur;

EXCEPTION
	WHEN CURSOR_ALREADY_OPEN THEN
		DBMS_OUTPUT.PUT_LINE('The Cursor Is Already Opened !');
END;
/

The Cursor Is Already Opened !

PL/SQL procedure successfully completed.

Compatibility (Tested on):

Oracle Database 10g Express Edition Release 10.2.0.1.0 – Product

Download Now… (.Zip File – 2KB)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.