How many types of cursors are available in PL/SQL?

There are two types of cursors in PL/SQL. Implicit cursor, and explicit cursor In PL/SQL, there are two main types of cursors: Implicit Cursors: These cursors are created by default when DML (Data Manipulation Language) statements like SELECT, INSERT, UPDATE, or DELETE are executed. They are automatically created and managed by the Oracle database engine. … Read more

What is cursor and why it is required?

A cursor is a temporary work area created in a system memory when an SQL statement is executed. A cursor contains information on a select statement and the row of data accessed by it. This temporary work area stores the data retrieved from the database and manipulate this data. A cursor can hold more than … Read more

What is consistency?

Consistency simply means that each user sees the consistent view of the data. Consider an example: there are two users A and B. A transfers money to B’s account. Here the changes are updated in A’s account (debit) but until it will be updated to B’s account (credit), till then other users can’t see the … Read more

What is mutating table error?

Mutating table error is occurred when a trigger tries to update a row that it is currently using. It is fixed by using views or temporary tables. In PL/SQL, a mutating table error occurs when a trigger or stored procedure references a table that is currently being modified by the statement that invoked the trigger … Read more

Explain the SAVEPOINT statement.

With SAVEPOINT, only part of transaction can be undone. In PL/SQL, the SAVEPOINT statement is used to set a point within the current transaction to which you can later roll back. This allows you to create a named point in your transaction where you can later return if needed, rather than rolling back the entire … Read more