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 select some rows from a table in oracle?
Write a syntax for update query in oracle?
How do I manually create a database in oracle?
what is the difference between substr and instr function in oracle?
State all possible different index configurations a table can possibly have?
Explain alias?
What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given statement use an index, even if the index scan may appear to be calculated as more costly?
How to create additional tablespaces for an new database?
How to define a variable to match a table column data type?
What is the implicit cursor in oracle?
How do I uninstall oracle 11g?
Explain about achiever in sql?
What privilege is needed for a user to create indexes in oracle?
What happens if you lost a data file?
What is rowid and rownum in oracle?