Tuesday, December 14, 2010

Defining Oracle CURSOR

Basically there are 3 types of CURSOR definition:

(a) basic
(b) with parameter
(c) with return

--

will explain the three but let me start with (b)

...
IS
  CURSOR cursor_salad (i_color IN FRUITS.COLOR%TYPE)
    IS
      SELECT NAME
      FROM   FRUITS
      WHERE  COLOR = i_color;
...


*** update Dec. 14 plsql challenge


Your Results


Your Score
604
You Got Right
4
You Got Wrong
0
Quiz's Correct Choices
1
Quiz's Incorrect Choices
3
Player Statistics


Number of Players
1168
Top Score
749
Lowest Score
69
Average Score
511.29
Your Ranking


This Month
1223
This Quarter
2044
Overall
3600

yay :D

well lesson learned, once you have defined the parameter of a CURSOR in a package, you cannot redefine it again because it was already opened - during the first definition. You could imagine the CURSOR as a public static-ally defined attribute inside a class - it is the same for all instances @A@

No comments:

Post a Comment