what is the use of cursors ... i've done one for deleteing specific records from the current table and inserting them in the history table ,, i need more ideas about where to use it also ..
There are a lot of good uses for cursors:
1. You can define a cursor and use it to define
a PLSQL table of records. Then you open the
cursor, fetch from the cursor and store it
in the PLSQL table. You can use data from
the fetched record to fetch inforamtio from
another cursor.
2. I use cursors to break down large multi table
joins into smaller pieces. This generally
improves performance, and gives you more control
over the query.
3. For many complex queries, cursors is the only
solution. The use of PLSQL, which is a mature
programming languare, and cursors provides a
a very powerfull set of tools for solving
complex database problems
I would suggest you get one of the Oracle Press
or O'Reilly books on PLSQL programming and look at
the many code examples.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.