Declaring a Cursor:
Cursor declaration describes the name and structure of the cursor together with the SELECT statement which will populate the cursor with data. This query is validated but not executed. To declare a cursor the keyword CURSOR is used. A syntax to declare a cursor is given below:
Syntax:
CURSOR <cursorname> IS <query>
Example:
CURSOR C1 is SELECT ename,job FROM emp;