I have a cursor that ive given an alias for one of its columns:
cursor cur is
select sum(debit) - sum(credit) rem_bal, emp_no
from balance
group by emp_no

Now, when i come to use that cursor like so:
for i in cur loop
if i.rem_bal>0 then
end if;
end loop;
I get errors when i use rem_bal as a column from the cursor
But, so how can i reference that first column from the cursor using an alias, and what if i didnt use an alias, how then?