Fetch cursor data to number variable : Cursor Fetch « Cursor « Oracle PL / SQL

Home
Oracle PL / SQL
1.Aggregate Functions
2.Analytical Functions
3.Char Functions
4.Constraints
5.Conversion Functions
6.Cursor
7.Data Type
8.Date Timezone
9.Hierarchical Query
10.Index
11.Insert Delete Update
12.Large Objects
13.Numeric Math Functions
14.Object Oriented Database
15.PL SQL
16.Regular Expressions
17.Report Column Page
18.Result Set
19.Select Query
20.Sequence
21.SQL Plus
22.Stored Procedure Function
23.Subquery
24.System Packages
25.System Tables Views
26.Table
27.Table Joins
28.Trigger
29.User Previliege
30.View
31.XML
Oracle PL / SQL » Cursor » Cursor Fetch 




Fetch cursor data to number variable
 
SQL> create table myTable x primary key organization index as select from dual;

Table created.

SQL>
SQL> create or replace procedure explicit2 is
  2   cursor explicit_cur is select from myTable;
  3   dummy number;
  4   begin
  5   open explicit_cur;
  6   for i in .. 50000 loop
  7       fetch explicit_cur     into dummy;
  8   end loop;
  9   close explicit_cur;
 10   end;
 11  /

Procedure created.

SQL>
SQL> drop table myTable;

Table dropped.

   
  














Related examples in the same category
1.Below is a function that demonstrates how to use the FETCH statement
2.Fetch value from cursor
3.Fetches the records from a cursor variable that returns employee information
4.Fetch cursor to two variables
5.legal and illegal FETCH statements.
6."ORA-1002: fetch out of sequence" because of the commit inside the SELECT..FOR UPDATE loop.
7.A WHILE cursor fetch loop.
8.Different BULK_COLLECT statements used for bulk binds
9.Check Cursor%FOUND after fetching
10.Fetch value in cursor until NOTFOUND
11.ORA-01002: fetch out of sequence
12.Fetch out cursor value and insert to another table
13.PLS-00394: wrong number of values in the INTO list of a FETCH statement
14.FETCH cursor BULK COLLECT
15.Fetch cursor till cursorVariable%notfound
16.Fetch cursor to table collection of row type
17.Fetch cursor value to three variables
18.Fetch row by row
19.Fetch single column cursor to varchar2 variable
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.