Complete the code to declare a cursor named mycursor for selecting all rows from the employees table.
DECLARE mycursor CURSOR FOR SELECT * FROM [1];The cursor is declared to select all rows from the employees table.
Complete the code to open the cursor named mycursor.
OPEN [1];The cursor named mycursor is opened to start fetching rows.
Fix the error in the FETCH statement to retrieve the next row from the cursor.
FETCH [1] FROM mycursor;The FETCH NEXT statement retrieves the next row from the cursor.
Fill both blanks to declare and open a cursor named emp_cursor selecting employee_id and name from employees.
DECLARE [1] CURSOR FOR SELECT employee_id, name FROM employees; OPEN [2];
The cursor is declared and opened using the same name emp_cursor.
Fill all three blanks to fetch the first row from cursor emp_cursor into variables emp_id and emp_name.
FETCH [1] FROM emp_cursor INTO [2], [3];
The FETCH FIRST statement retrieves the first row, storing values into variables emp_id and emp_name.