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

Explain user account with reference to oracle.

540


What is oracle latest version?

588


Why do I get java.lang.abstractmethoderror when trying to load a blob in the db?

558


What are triggers in oracle?

563


What happens in oracle commit?

572






You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?

1460


How to experiment a data lock in oracle?

598


What are the roles of dba?

614


State the difference between a primary key and foreign key?

518


how to join query for one source type is oracle another source type is sql server ?

1993


Write a trigger example in oracle?

575


Explain alias?

717


What is the oracle implicit cursor?

596


What is a cursor variable?

580


What is blob datatype?

571