Featured Post

NoSQL use cases

Here are a simple summary of use cases for Cassandra, MongoDB and Redis MongoDB Storing Log Data Speed is the primary perfor...

Sunday, July 22, 2012

PL/SQL Cursor loops

In this post i'll show a short snippet of code about loops with cursors in PL/SQL (Procedural Language/Structured Query Language) language.

A simple way to do a loop in PL/SQL language is to use cursors as shown below.

Cursor loop

for myrec in (select col1, col2 from table A)

       /* here you can use myrec.col1 or myrec.col2 to access and manage fields */
end loop;

No comments :

Post a Comment