Hello ;
Good Morning Everyone ;
I am a beginner in PL/SQL area. I doing self study pl/sql concepts.
I have written plsql program for cursors. i am getting error.
i am need some claen explantion for
which is recommended for " %TYPE and %ROWTYPE " in PL/SQL (explicit cursors)
SQL> DECLARE
2 disp disp%rowtype;
3 cursor c1 is select * From tab2;
4 i number:=0;
5 BEGIN
6 open c1;
7 for i in 1..5 loop
8 fetch c1 into disp;
9 dbms_output.put_line(disp.no || 'NO' || disp.first_name || 'first_name' || disp.last_name || 'last_name'
10 || disp.salary || 'salary' ||disp.bonus || 'bonus' || disp.qual || 'qual');
11 end loop;
12 close c1;
13 end;
14 /
disp disp%rowtype;
*
ERROR at line 2:
ORA-06550: line 2, column 6:
PLS-00320: the declaration of the type of this expression is incomplete or
malformed
ORA-06550: line 2, column 6:
PL/SQL: Item ignored
ORA-06550: line 8, column 15:
PLS-00320: the declaration of the type of this expression is incomplete or
malformed
ORA-06550: line 8, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 9, column 22:
PLS-00320: the declaration of the type of this expression is incomplete or
malformed
ORA-06550: line 9, column 1:
PL/SQL: Statement ignored
SQL> desc tab2;
Name Null? Type
----------------------------------------- -------- ----------------------------
NO NUMBER
FIRST_NAME VARCHAR2(10)
LAST_NAME VARCHAR2(15)
SALARY NUMBER
BONUS NUMBER
QUAL VARCHAR2(10)
Thanks in advance !