%NotFound
True, agar fetch operatori
biror yozuv qaytarmasa
Cursor_nomi%NotFound
False, agar fetch operatori
kamida bitta yozuv
qaytarsa
%RowCount
Cursordagi yozuvlar soni
Cursor_nomi%RowCount
%IsOpen
Cursor ochiqligini
tekshiradi (True, False)
Cursor_nomi%ISOPEN
Kursordan foydalanish ketma-ketligi
Misol–1.
DECLARE
––1. kursorni e’lon qilish
CURSOR empcur
IS
SELECT empno, ename
FROM emp;
v_empno emp.empno%TYPE;
v_name emp.ename%TYPE;
BEGIN
OPEN empcur;
–– 2: kursorni ochish
LOOP
–– 3: kursordagi ma’lumotlarni LOOP orqali o‘qish.
FETCH empcur
INTO v_empno, v_name;
EXIT WHEN empcur%NOTFOUND;