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?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between formal parameters and actual parameters?

1005


State some uses of redo log files?

947


How to rollback the current transaction in oracle?

986


Explain rename?

925


How will you write a query to get a 5th rank student from a table student_report?

1814


Explain compound trigger in oracle?

988


Explain the use of parfile option in exp command.

991


Explain the use of indexes option in exp command.

1066


How does one get the view definition of fixed views/tables?

969


What is oracle in java?

913


what's query optimization and without use of IN AND Exist can we get another way data from query

2090


Explain the difference between a procedure and a function? What do you understand by those terms?

1023


What is the difference between alert log file and tarce file ?

2099


What is max rowid in oracle?

966


What is the parameter mode that can be passed to a procedure?

981