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 the basic form of sql query?

495


What is sql in java?

546


Define select, insert, create, delete, update, drop keywords

600


Why is sql important?

584


Can we use ddl statements in stored procedure sql server?

520






Can triggers stop a dml statement from executing on a table?

618


What is foreign key and example?

519


How to make a copy values from one column to another in sql?

577


How do you use join?

524


What are the different types of triggers?

594


What program will open a mdb file?

503


What is materialized view in sql?

466


how to add a new column to an existing table in mysql? : Sql dba

585


what is a constraint? Tell me about its various levels. : Sql dba

564


Does pdo prevent sql injection?

520