{"id":613,"date":"2026-07-15T05:25:04","date_gmt":"2026-07-15T05:25:04","guid":{"rendered":"https:\/\/mitalgoswami.in\/?p=613"},"modified":"2026-07-23T05:57:37","modified_gmt":"2026-07-23T05:57:37","slug":"cursor-in-oracle-pl-sql","status":"publish","type":"post","link":"https:\/\/mitalgoswami.in\/?p=613","title":{"rendered":"Cursor in Oracle PL\/SQL"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A <strong>Cursor<\/strong> is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process <strong>one row at a time<\/strong> from the query result.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cursors are mainly used when a query returns <strong>multiple rows<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Types of Cursors<\/h1>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Implicit Cursor<\/strong><\/li>\n\n\n\n<li><strong>Explicit Cursor<\/strong><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">1. Implicit Cursor<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Created automatically by Oracle.<\/li>\n\n\n\n<li>Used for SQL statements that return <strong>one row<\/strong> or affect rows (<code>INSERT<\/code>, <code>UPDATE<\/code>, <code>DELETE<\/code>, <code>SELECT INTO<\/code>).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>BEGIN\n   UPDATE EMPLOYEE\n   SET SALARY = SALARY + 5000\n   WHERE EMP_ID = 101;\n\n   DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' Row Updated');\nEND;\n\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>1 Row Updated<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">2. Explicit Cursor<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Created by the programmer.<\/li>\n\n\n\n<li>Used when a query returns <strong>multiple rows<\/strong>.<\/li>\n\n\n\n<li>The programmer controls opening, fetching, and closing the cursor.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Steps to Use an Explicit Cursor<\/h1>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Declare the cursor.<\/li>\n\n\n\n<li>Open the cursor.<\/li>\n\n\n\n<li>Fetch rows from the cursor.<\/li>\n\n\n\n<li>Close the cursor.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Syntax<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>DECLARE\n   CURSOR cursor_name IS\n      SELECT column_list\n      FROM table_name;\n\nBEGIN\n   OPEN cursor_name;\n\n   LOOP\n      FETCH cursor_name INTO variables;\n\n      EXIT WHEN cursor_name%NOTFOUND;\n\n      -- Process the row\n   END LOOP;\n\n   CLOSE cursor_name;\nEND;\n\/<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Example: Explicit Cursor<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose the <code>EMPLOYEE<\/code> table contains:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>EMP_ID<\/th><th>EMP_NAME<\/th><th>SALARY<\/th><\/tr><\/thead><tbody><tr><td>101<\/td><td>Amit<\/td><td>25000<\/td><\/tr><tr><td>102<\/td><td>Rahul<\/td><td>30000<\/td><\/tr><tr><td>103<\/td><td>Neha<\/td><td>28000<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>DECLARE\n   CURSOR c_emp IS\n      SELECT EMP_ID, EMP_NAME, SALARY\n      FROM EMPLOYEE;\n\n   v_id EMPLOYEE.EMP_ID%TYPE;\n   v_name EMPLOYEE.EMP_NAME%TYPE;\n   v_salary EMPLOYEE.SALARY%TYPE;\n\nBEGIN\n   OPEN c_emp;\n\n   LOOP\n      FETCH c_emp INTO v_id, v_name, v_salary;\n\n      EXIT WHEN c_emp%NOTFOUND;\n\n      DBMS_OUTPUT.PUT_LINE(\n         v_id || ' ' || v_name || ' ' || v_salary\n      );\n   END LOOP;\n\n   CLOSE c_emp;\nEND;\n\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>101 Amit 25000\n102 Rahul 30000\n103 Neha 28000<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Cursor FOR Loop (Simplest Method)<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle automatically opens, fetches, and closes the cursor.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DECLARE\n   CURSOR c_emp IS\n      SELECT EMP_ID, EMP_NAME\n      FROM EMPLOYEE;\nBEGIN\n   FOR emp_rec IN c_emp LOOP\n      DBMS_OUTPUT.PUT_LINE(\n         emp_rec.EMP_ID || ' ' || emp_rec.EMP_NAME\n      );\n   END LOOP;\nEND;\n\/<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Cursor Attributes<\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Attribute<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>%FOUND<\/code><\/td><td>Returns <code>TRUE<\/code> if the last fetch returned a row.<\/td><\/tr><tr><td><code>%NOTFOUND<\/code><\/td><td>Returns <code>TRUE<\/code> if no row was returned.<\/td><\/tr><tr><td><code>%ROWCOUNT<\/code><\/td><td>Returns the number of rows fetched so far.<\/td><\/tr><tr><td><code>%ISOPEN<\/code><\/td><td>Returns <code>TRUE<\/code> if the cursor is open.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Example of Cursor Attributes<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>DECLARE\n   CURSOR c_emp IS\n      SELECT * FROM EMPLOYEE;\n\n   emp_rec EMPLOYEE%ROWTYPE;\nBEGIN\n   OPEN c_emp;\n\n   LOOP\n      FETCH c_emp INTO emp_rec;\n\n      EXIT WHEN c_emp%NOTFOUND;\n\n      DBMS_OUTPUT.PUT_LINE(\n         'Rows fetched: ' || c_emp%ROWCOUNT\n      );\n   END LOOP;\n\n   CLOSE c_emp;\nEND;\n\/<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Advantages of Cursors<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Processes records one row at a time.<\/li>\n\n\n\n<li>Handles multiple-row query results.<\/li>\n\n\n\n<li>Gives greater control over data retrieval.<\/li>\n\n\n\n<li>Makes row-by-row processing easy.<\/li>\n\n\n\n<li>Supports complex business logic.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Implicit vs Explicit Cursor<\/h1>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Implicit Cursor<\/th><th>Explicit Cursor<\/th><\/tr><\/thead><tbody><tr><td>Created automatically by Oracle<\/td><td>Created by the programmer<\/td><\/tr><tr><td>Used for single-row queries and DML<\/td><td>Used for multi-row queries<\/td><\/tr><tr><td>No need to open or close<\/td><td>Must be opened and closed manually (unless using a <code>FOR<\/code> loop)<\/td><\/tr><tr><td>Easier to use<\/td><td>More control over processing<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Interview\/Exam Questions<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q1. What is a cursor in PL\/SQL?<\/strong><br><strong>Answer:<\/strong> A cursor is a pointer to the result set of a SQL query that allows row-by-row processing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q2. What are the two types of cursors?<\/strong><br><strong>Answer:<\/strong> Implicit Cursor and Explicit Cursor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q3. What are the four steps of an explicit cursor?<\/strong><br><strong>Answer:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Declare<\/li>\n\n\n\n<li>Open<\/li>\n\n\n\n<li>Fetch<\/li>\n\n\n\n<li>Close<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q4. Which cursor attribute returns the number of rows fetched?<\/strong><br><strong>Answer:<\/strong> <code>%ROWCOUNT<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q5. Which cursor attribute checks whether a cursor is open?<\/strong><br><strong>Answer:<\/strong> <code>%ISOPEN<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors 1. Implicit Cursor Example Output 2. Explicit Cursor Steps to Use an Explicit [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[37],"class_list":["post-613","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/mitalgoswami.in\/?p=613\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Mital&#039;s Blog - My  Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Cursor in Oracle PL\/SQL - Mital&#039;s Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mitalgoswami.in\/?p=613\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-15T05:25:04+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-23T05:57:37+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Cursor in Oracle PL\/SQL - Mital&#039;s Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#blogposting\",\"name\":\"Cursor in Oracle PL\\\/SQL - Mital's Blog\",\"headline\":\"Cursor in Oracle PL\\\/SQL\",\"author\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?author=1#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/#organization\"},\"datePublished\":\"2026-07-15T05:25:04+00:00\",\"dateModified\":\"2026-07-23T05:57:37+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#webpage\"},\"articleSection\":\"oracle, oracle\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mitalgoswami.in#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mitalgoswami.in\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?cat=30#listItem\",\"name\":\"oracle\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?cat=30#listItem\",\"position\":2,\"name\":\"oracle\",\"item\":\"https:\\\/\\\/mitalgoswami.in\\\/?cat=30\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#listItem\",\"name\":\"Cursor in Oracle PL\\\/SQL\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mitalgoswami.in#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#listItem\",\"position\":3,\"name\":\"Cursor in Oracle PL\\\/SQL\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?cat=30#listItem\",\"name\":\"oracle\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/#organization\",\"name\":\"Mital's Blog\",\"description\":\"My  Blog\",\"url\":\"https:\\\/\\\/mitalgoswami.in\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?author=1#author\",\"url\":\"https:\\\/\\\/mitalgoswami.in\\\/?author=1\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a575ce1a3c064ed3befd825918c1c0457a92281570ba3e96c008e1c0af08ddc5?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#webpage\",\"url\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613\",\"name\":\"Cursor in Oracle PL\\\/SQL - Mital's Blog\",\"description\":\"A Cursor is a pointer to the result set of a SQL query. It allows PL\\\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?p=613#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?author=1#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/?author=1#author\"},\"datePublished\":\"2026-07-15T05:25:04+00:00\",\"dateModified\":\"2026-07-23T05:57:37+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/#website\",\"url\":\"https:\\\/\\\/mitalgoswami.in\\\/\",\"name\":\"Mital's Blog\",\"description\":\"My  Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mitalgoswami.in\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Cursor in Oracle PL\/SQL - Mital's Blog","description":"A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for","canonical_url":"https:\/\/mitalgoswami.in\/?p=613","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/mitalgoswami.in\/?p=613#blogposting","name":"Cursor in Oracle PL\/SQL - Mital's Blog","headline":"Cursor in Oracle PL\/SQL","author":{"@id":"https:\/\/mitalgoswami.in\/?author=1#author"},"publisher":{"@id":"https:\/\/mitalgoswami.in\/#organization"},"datePublished":"2026-07-15T05:25:04+00:00","dateModified":"2026-07-23T05:57:37+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/mitalgoswami.in\/?p=613#webpage"},"isPartOf":{"@id":"https:\/\/mitalgoswami.in\/?p=613#webpage"},"articleSection":"oracle, oracle"},{"@type":"BreadcrumbList","@id":"https:\/\/mitalgoswami.in\/?p=613#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mitalgoswami.in#listItem","position":1,"name":"Home","item":"https:\/\/mitalgoswami.in","nextItem":{"@type":"ListItem","@id":"https:\/\/mitalgoswami.in\/?cat=30#listItem","name":"oracle"}},{"@type":"ListItem","@id":"https:\/\/mitalgoswami.in\/?cat=30#listItem","position":2,"name":"oracle","item":"https:\/\/mitalgoswami.in\/?cat=30","nextItem":{"@type":"ListItem","@id":"https:\/\/mitalgoswami.in\/?p=613#listItem","name":"Cursor in Oracle PL\/SQL"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mitalgoswami.in#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mitalgoswami.in\/?p=613#listItem","position":3,"name":"Cursor in Oracle PL\/SQL","previousItem":{"@type":"ListItem","@id":"https:\/\/mitalgoswami.in\/?cat=30#listItem","name":"oracle"}}]},{"@type":"Organization","@id":"https:\/\/mitalgoswami.in\/#organization","name":"Mital's Blog","description":"My  Blog","url":"https:\/\/mitalgoswami.in\/"},{"@type":"Person","@id":"https:\/\/mitalgoswami.in\/?author=1#author","url":"https:\/\/mitalgoswami.in\/?author=1","name":"admin","image":{"@type":"ImageObject","@id":"https:\/\/mitalgoswami.in\/?p=613#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a575ce1a3c064ed3befd825918c1c0457a92281570ba3e96c008e1c0af08ddc5?s=96&d=mm&r=g","width":96,"height":96,"caption":"admin"}},{"@type":"WebPage","@id":"https:\/\/mitalgoswami.in\/?p=613#webpage","url":"https:\/\/mitalgoswami.in\/?p=613","name":"Cursor in Oracle PL\/SQL - Mital's Blog","description":"A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mitalgoswami.in\/#website"},"breadcrumb":{"@id":"https:\/\/mitalgoswami.in\/?p=613#breadcrumblist"},"author":{"@id":"https:\/\/mitalgoswami.in\/?author=1#author"},"creator":{"@id":"https:\/\/mitalgoswami.in\/?author=1#author"},"datePublished":"2026-07-15T05:25:04+00:00","dateModified":"2026-07-23T05:57:37+00:00"},{"@type":"WebSite","@id":"https:\/\/mitalgoswami.in\/#website","url":"https:\/\/mitalgoswami.in\/","name":"Mital's Blog","description":"My  Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/mitalgoswami.in\/#organization"}}]},"og:locale":"en_US","og:site_name":"Mital's Blog - My  Blog","og:type":"article","og:title":"Cursor in Oracle PL\/SQL - Mital's Blog","og:description":"A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for","og:url":"https:\/\/mitalgoswami.in\/?p=613","article:published_time":"2026-07-15T05:25:04+00:00","article:modified_time":"2026-07-23T05:57:37+00:00","twitter:card":"summary_large_image","twitter:title":"Cursor in Oracle PL\/SQL - Mital's Blog","twitter:description":"A Cursor is a pointer to the result set of a SQL query. It allows PL\/SQL to retrieve and process one row at a time from the query result. Cursors are mainly used when a query returns multiple rows. Types of Cursors Implicit Cursor Explicit Cursor 1. Implicit Cursor Created automatically by Oracle. Used for"},"aioseo_meta_data":{"post_id":"613","title":"#post_title #separator_sa #site_title","description":"#post_excerpt","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2026-07-15 05:25:05","updated":"2026-07-24 04:48:56","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mitalgoswami.in\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mitalgoswami.in\/?cat=30\" title=\"oracle\">oracle<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCursor in Oracle PL\/SQL\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/mitalgoswami.in"},{"label":"oracle","link":"https:\/\/mitalgoswami.in\/?cat=30"},{"label":"Cursor in Oracle PL\/SQL","link":"https:\/\/mitalgoswami.in\/?p=613"}],"_links":{"self":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=613"}],"version-history":[{"count":1,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions"}],"predecessor-version":[{"id":614,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions\/614"}],"wp:attachment":[{"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mitalgoswami.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}