How to create index-by table in oracle?

Answer Posted / santosh kumar

declare
type str is table of number index by binary_integer;
tab_res str; ---------declaring variable....
min_eid number;
max_eid number;
begin
select min(employee_id),max(employee_id) into
min_eid,max_eid
from employees;
for i in min_eid..max_eid loop
select salary into tab_rec(i) from employees
where employee_id=i;
end;

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create additional tablespaces for an new database?

807


What is merge in oracle?

809


How to retrieve values from data fields in record variables?

808


Why is oracle so popular?

762


Explain oracle left join with an example?

781


How to define a data source name (dsn) in odbc manager?

798


what is the scenario where you take the database to NoArchivelog mode?

2077


How to create an initialization parameter file?

763


What happens to the current transaction if the session is ended?

832


1) Does oracle have any table which contain all the exceptions and it's code internally?

1523


What are a cluster and non-cluster index?

785


What is a select query statement in oracle?

731


What is rowid and rownum in oracle?

788


How to use "if" statements on multiple conditions?

942


Explain joins in oracle?

785