What is a cursor for loop ?

Answer Posted / dipti

Another nice feature of the CURSOR FOR is the ability to
define the cursor inline. Below is a cursor that is not
declared in the declaration section of the executing
block. The cursor definition is included in the CURSOR FOR.
SQL> begin
2 for r_c11 in
(select author_last_name l_name,
3 author_first_name f_name
4 from author) loop
5 dbms_output.put_line(initcap(
6 r_c11.l_name||
', '||r_c11.f_name));
7 end loop;
8 end;
9

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are triggers and its uses?

820


What is difference between primary and secondary key?

773


How do I quit sql?

701


What are stored procedures in mysql?

785


what is datawarehouse? : Sql dba

781


How can you fetch first 5 characters of the string?

733


What is duration in sql profiler trace?

799


What is record variable?

740


How many sql commands are there?

882


What is procedure explain with program?

749


How to know the last executed procedure?

835


How many sql statements are used? Define them.

798


Does truncate need commit?

714


How do I remove all records from a table?

806


Does truncate remove indexes?

750