Answers

Question and Answer:

  Home  Oracle Database

⟩ What Is the Implicit Cursor in Oracle?

The implicit cursor is the cursor automatically defined by PL/SQL for you. Whenever a SQL statement is executed, this cursor will be assigned to represent the execution of this statement. This implicit cursor is called SQL. It has many attributes representing some good information about the execution like:

► SQL%FOUND - True, if the SQL statement has changed any rows.

► SQL%NOTFOUND - True, if the SQL statement has not changed any rows.

► SQL%ROWCOUNT - The number of rows affected by the SQL statement.

See the example below on how to use the implicit cursor:

CREATE TABLE student (id NUMBER(5) PRIMARY KEY,

first_name VARCHAR(80) NOT NULL,

last_name VARCHAR(80) NOT NULL);

Table created.

 210 views

More Questions for you: