How to perform a loop through all tables in pl/sql?

Answer Posted / chandrakant rathod

We can get all tables for particular instance using below block .

SET SERVEROUTPUT ON;
begin
for rec in (select object_name from user_objects where object_type='TABLE')
loop
dbms_output.put_line('TABLE'||rec.object_name);
end loop;
end;
/

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

describe transaction-safe table types in mysql : sql dba

502


Can %notfound return null after a fetch?

587


What is a unique constraint?

608


What is update query?

547


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

902






How do you add a column to a table?

598


Is sql sequential or random?

537


How to sort the rows in sql.

600


How global cursor can be declare with dynamic trigger ?

1746


What are the most important characteristics of pl/sql?

573


how to get a list of indexes of an existing table? : Sql dba

514


What is date functions?

575


What is sql comments?

648


Can we commit inside a trigger?

547


Which is better join or inner query?

514