PL/SQL tutorial | Cursor in Oracle Database 11g Complete guide

Learn in depth about cursor in oracle database 11g, and why to use cursor.Writing Implicit cursor and explicit cursor following using ‘for loop’ inside cursor to fetch multiple records from oracle database.

Cursor in Oracle
Cursor in PL/SQL
Oracle Cursor
PL/SQL Cursor
What is cursor in PL/SQL
How to use cursor in PL/SQL
Implicit cursor in PL/SQL
Explicit cursor in PL/SQL

A cursor is a pointer to this context area. PL/SQL controls the context area through a cursor. A cursor holds the rows (one or more) returned by a SQL statement. The set of rows the cursor holds is referred to as the active set.

Implicit Cursors
Implicit cursors are automatically created by Oracle whenever an SQL statement is executed, when there is no explicit cursor for the statement. Programmers cannot control the implicit cursors and the information in it.

Returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows or a SELECT INTO statement returned one or more rows. Otherwise, it returns FALSE.

The logical opposite of %FOUND. It returns TRUE if an INSERT, UPDATE, or DELETE statement affected no rows, or a SELECT INTO statement returned no rows. Otherwise, it returns FALSE.

Always returns FALSE for implicit cursors, because Oracle closes the SQL cursor automatically after executing its associated SQL statement.

Returns the number of rows affected by an INSERT, UPDATE, or DELETE statement, or returned by a SELECT INTO statement.

Explicit Cursors
Explicit cursors are programmer-defined cursors for gaining more control over the context area. An explicit cursor should be defined in the declaration section of the PL/SQL Block. It is created on a SELECT Statement which returns more than one row



Dar Zeeshan says:

what is difference between implicit and explicit cursor?

Dar Zeeshan says:

thanks a lot ..nice ….sir can u please tell me why select statement is not used in implicit cursor???

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles Show Cars Motorbikes Scooters Rims & Tires Luxury BoatsFashion Sunglasses Luxury Watches Luxury Purses Jeans Wear High Heels Perfumes Jewellery Cosmetics Shaving Helpers Fashion HatsFooding Chef Club Fooding Helpers Coktails & LiquorsSports Sport Shoes Fitness & Detox Golf Gear Racquets Diving Equipment Ski Gear Snowboards Surf Boards Rollers & SkatesEntertainment DIY Guides Zik Instruments Published Books Music Albums Cine Movies Trading Helpers Make Money Fishing Equipment Paintball Supplies Trading Card Games Telescopes Knives VapesHigh Tech Flat Screens Tech Devices Camera Lenses Printers USB Devices PC Hardware Network Gear Cloud Servers Software Helpers Programmer Helpers Mobile Apps Hearing AidsHome Home Furniture Home Appliances Beddings Floor Layings Barbecues Aquarium Gear Safe Boxes Office Supplies Security Locks Cleaning ProductsKids Baby Strollers Child Car Seats Remote ControlledTravel Luggages & Bags Airlines Seats Hotel Rooms Fun Trips Cruise Ships Mexico Tours