HIGH-LEVEL LANGUAGE
EXTENSION
WITH SIMPLE CURSOR
AIM:
To write a
PL/SQL program for high level language extension with simple cursor
ALGORITHM:
Step 1: Start the program
Step
2: declare the cursor named cur
Step 3 : if not cur is open then print ‘yet to be opened’
Step 4 : if cur is
opened then print ‘cursor is opened’
Step 5: display the
value of a as result
Step 6 : Stop the
program
PROGRAM:
SQL> set serveroutput on
SQL> declare
2 cursor cur is select * from jumbo;
3 begin
4 if not cur% isopen then
5 dbms_output.put_line('yet to be opened');
6 end if;
7 open cur;
8 if cur% isopen then
9 dbms_output.put_line('cursor opened');
10 end if;
11 close cur;
12 end;
13 /
OUTPUT:
yet to be opened
cursor opened
PL/SQL procedure
successfully completed.
0 comments:
Post a Comment