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

What is break?

842


What are the most important characteristics of pl/sql?

781


what is 'mysqlshow'? : Sql dba

748


How can you create an empty table from an existing table?

796


What is the purpose of a secondary key?

679






Define the select into statement.

774


Are stored procedures compiled?

678


What information is needed to connect sql*plus an oracle server?

764


What is the starting oracle error number?

752


What are sql built in functions?

674


When is a declare statement required?

864


how to concatenate two character strings? : Sql dba

741


What is a sql schema used for?

727


Explain autonomous transaction.

839


Can we group by two columns in sql?

727