Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to create index-by table in oracle?

Answers were Sorted based on User's Feedback



How to create index-by table in oracle?..

Answer / 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

How to create index-by table in oracle?..

Answer / su

declare
TYPE tab IS TABLE OF varchar2(200)
INDEX BY binary_integer;
t tab;
v_counter number : =0;
BEGIN
FOR c_emp IN (SELECT ENAME FROM emp)
LOOP
v_counter := v_counter + 1;
t(v_counter):= c_emp.ename;
END LOOP;
FOR i IN 1 .. t.last
LOOP
dbms_output.put_line(t(i));
END LOOP;
EXCEPTION
WHEN others THEN
dbms_output.put_line(sqlcode);
dbms_output.put_line(sqlerrm);
END;

Is This Answer Correct ?    0 Yes 0 No

How to create index-by table in oracle?..

Answer / sourav mukhopadhyay

Create index INDEXNAME
ON table(column-name);

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Oracle General Interview Questions

How would you design a database for an e-commerce website?

1 Answers  


How to install oracle odbc drivers?

0 Answers  


What is Java Pool in Oracle?

0 Answers   MCN Solutions,


Can you assign multiple query result rows to a variable?

0 Answers  


Explain what are the advantages of views?

0 Answers  


How to start your 10g xe server?

0 Answers  


what is partitioning? Types of partitioning. explain? what is the new kind of partitioning type introduced in 9i?

0 Answers  


Draw E-R diagram for many to many relationship ?

0 Answers   Keane India Ltd,


What is open database communication (odbc) in oracle?

0 Answers  


What is oracle and what are its different editions?

0 Answers  


can a view be updated?

3 Answers  


How to get execution path reports on query statements?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)