I have 2 tables
dept having deptno, dname in this deptno primary key
emp having eno,ename ,esal,deptno in this eno is primary key and deptno is foreign key references dept(deptno)
using cursor, i want to retrieving all emp columns and dname only.
in cursor
declare c1 cursor
for
select eno,ename,esal,e.deptno , dname from emp e, dept d where e.deptno=d.deptno
but in this case , when we creae dclgen for dept and emp
It creates hv-deptno same name as host variable name for both tables(emp,dept) of deptno
how we represent when we use
fetch c1
into
:hv-eno,
:hv-ename,
:hv-esal,
[color=#000040]:hv-deptno, /* how to mention here this is from emp table*/
:hv-dname