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
What is difference between truncate and delete?
Can we insert data in view oracle?
What is the usage of analyze command in oracle?
What is the data type of dual table?
What is a connect identifier?
how to clone 9i Database on to 10g Database.
What is blob datatype?
What do you mean by group by clause?
How to insert a record into a table?
State all possible different index configurations a table can possibly have?
How to create a table in a specific tablespace?
What is the difference between Delete, Truncate and Drop in Oracle?
is there a tool to trace queries, like profiler for sql server?
What is the simplest tool to run commands on oracle servers?
How to change program global area (pga) in oracle?