Database - Explain the cursor types

Explain the cursor types.

DYNAMIC: It reflects changes happened on the table while scrolling through the row.
STATIC: It works on snapshot of record set and disconnects from the server. This kind doesn’t reflects changes happened on the table while scrolling through the row.
KEYSET: In this kind, new record is not reflected, but data modification can be seen.

Explain the cursor types.

There are two types of cursors:

1. Implicit Cursor: It is declared automatically when the SQL statement is executed. User is not aware of what is happening and cannot control or process the information available in the implicit cursor.

2. Explicit Cursor: Explicit cursor is defined in PL/SQL block which is to handle the query that fetches more than one row. The developer/programmer needs to declare, open the cursor. Then he/she needs to fetch and process sequentially all the rows and close it.
Database - Explain in brief the cursor optimization tips
Close cursor when it is not required, you shouldn’t forget to deallocate cursor after closing it......
Database - What is sub-query?
A query within a query is defined as a sub-query. A sub query is executed by enclosing it within another query....
Database - Explain the use of group by clause
Group By" is used to derive aggegate values by grouping similar data.....
Post your comment