ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
   
 
Categories  >>  Software  >>  Databases  >>  Oracle  >>  Oracle General
 
 


 

 
 Oracle General interview questions  Oracle General Interview Questions
 OCI interview questions  OCI Interview Questions
 Architecture interview questions  Architecture Interview Questions
 Oracle Security interview questions  Oracle Security Interview Questions
 Database Management interview questions  Database Management Interview Questions
 Forms Reports interview questions  Forms Reports Interview Questions
 Oracle AllOther interview questions  Oracle AllOther Interview Questions
Question
How to create index-by table in oracle?
 Question Submitted By :: V.gurus
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to create index-by table in oracle?
Answer
# 1
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
Santosh Kumar
 
  Re: How to create index-by table in oracle?
Answer
# 2
Create index INDEXNAME
ON table(column-name);
 
Is This Answer Correct ?    1 Yes 5 No
Sourav Mukhopadhyay
 
 
 
  Re: How to create index-by table in oracle?
Answer
# 3
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
Su
 

 
 
 
Other Oracle General Interview Questions
 
  Question Asked @ Answers
 
HOW TO DISPLAY MAXIMUM SALARIES FROM EMP DEPARTMENT VISE ALONG WITH DEPARTMENT NAMES? E.g EMP,DEPT DELL5
How to select the name of employee who is getting maximum sal with out using subquery  15
select * from emp what happened internally when we write this query in the sql prompt?  5
waht is referencial integrity? Semantic-Space2
how many outer joins are used in a single sql query? is there any limitations for using of outer joins? Cap-Gemini2
What are cursor?where are they used?  2
Table E: Name dept month sal 1 A JAN 800 2 B APR 1000 3 A JAN 300 4 A JAN 600 5 C JUN 400 1) SELECT HIGHEST SAL PAID DEPT IN JAN MONTH? 2) WRITE QUERY GET MAX SAL DEPT NO? IBM6
what is difference between DBMS and RDBMS?  2
what are the database links ?  2
which clause we are not used in where clause? Semantic-Space3
i deleted 4 records form the table.after i have applied commit .now i want to get back those records.how? IBM7
How to define Data Block size ?  1
 
For more Oracle General Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com