Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (9k points)
What is Cursor in PL SQL?

1 Answer

0 votes
by (45.3k points)

Cursor in PL SQL is a pointer to the memory area of Oracle called context area. PL/SQL allows you to control the context area using a cursor. It holds one or more rows that are returned by any SQL statement. The row or set of rows helped by the cursor is the active set. PL/SQL cursors are of two types:

  • Implicit Cursor: They are created automatically when there is an execution of the SQL statement and no explicit cursor is available for it. You cannot control implicit cursor along with the information it contains. Whenever you execute a DML statement like INSERT, DELETE, and UPDATE, an implicit cursor is automatically associated with that statement.
  • Explicit Cursor: They are user-defined cursors that provide you more control with respect to the context area. You should define the explicit cursor in the declaration section of the block of PL/SQL code. It is created on a PL/SQL SELECT statement that returns multiple rows.

If you want to make a successful career in PL/SQL then you must read PL/SQL Interview Questions.

You should also sign up for SQL Training to learn in-depth about SQL and PL/SQL database query languages.

You should also check out this video on SQL and PL/SQL:

Related questions

0 votes
1 answer
asked Jan 29, 2020 in SQL by anmolj (9k points)
0 votes
1 answer
asked Dec 10, 2020 in SQL by dev_sk2311 (45k points)
0 votes
1 answer
asked Oct 19, 2020 in SQL by dev_sk2311 (45k points)
0 votes
1 answer
asked Jan 29, 2020 in SQL by anmolj (9k points)
0 votes
1 answer
asked Jan 29, 2020 in SQL by anmolj (9k points)

Browse Categories

...