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 an oracle data file?

1093


How to connect ms access to oracle servers?

992


How to start a new transaction in oracle?

1076


What are oracle functions?

1019


What is the data pump import utility?

1025


What are the different editions of oracle?

1098


How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?

2244


How to run create database statement?

1019


I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database

2123


Design database draw er diagram for a certain scenario ?

4573


What the is the diff between local index and global index. give some example.

1628


How to shutdown your 10g xe server from command line?

1076


What is a trace file and how is it created in oracle?

1041


How a tablespace is related to data files?

1099


How would you begin to troubleshoot an ORA-3113 error?

2071