Oracle PL-SQL Question:
Download Job Interview Questions and Answers PDF
What is a cursor for loop?
![Oracle PL-SQL Interview Answer Oracle PL-SQL Interview Question](/public/images/interview/12.webp)
Answer:
Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of values from active set into fields in the record and closes when all the records have been processed.
eg. FOR emp_rec IN C1 LOOP
salary_total := salary_total +emp_rec sal;
END LOOP;
eg. FOR emp_rec IN C1 LOOP
salary_total := salary_total +emp_rec sal;
END LOOP;
Download Oracle PL-SQL Interview Questions And Answers
PDF
Previous Question | Next Question |
What is an oracle stored procedure? | What are the cursor attributes used in PL/SQL? |