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
How to initialize variables with default values?
How many types of table in Oracle?
how do u setup a replication site?
Explain implicit cursor.
How many types of auditing in Oracle?
How to load data through external tables?
What is the usage of merge statement?
How to use like conditions in oracle?
What is the max number of columns in an oracle table?
What is not equal to in oracle?
What is the purpose of tables, private synonyms and public synonyms in Oracle?
What is a table index?
How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?
What is a subquery?
how may join possible between (requisition with purchase order)