Updating fetch in plsql
In the declaration block, two variables I_dept_name and I_dept_id are to be declared to hold the dept id and dept name values.
This will assign an area in memory for the cursor, parse and execute the query to get the desired output and then issue the fetch to get the first row from the result set.
The number and type of variables should match the select columns.
And, then declare a cursor cur_get_department to select the dept_name and dept_id from the department where dept_id is equal to 1.
Open a PLSQL Cursor in the execution section using the name.