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 the difference between formal parameters and actual parameters?
State some uses of redo log files?
How to rollback the current transaction in oracle?
Explain rename?
How will you write a query to get a 5th rank student from a table student_report?
Explain compound trigger in oracle?
Explain the use of parfile option in exp command.
Explain the use of indexes option in exp command.
How does one get the view definition of fixed views/tables?
What is oracle in java?
what's query optimization and without use of IN AND Exist can we get another way data from query
Explain the difference between a procedure and a function? What do you understand by those terms?
What is the difference between alert log file and tarce file ?
What is max rowid in oracle?
What is the parameter mode that can be passed to a procedure?