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 cross join? : Sql dba

559


What is package in pl sql?

566


First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.

1128


Are stored procedures faster than dynamic sql?

518


how to write date and time literals? : Sql dba

519






How does cross join work in sql?

522


What's the procedure?

477


Explain unique key in sql.

552


What are inner and outer joins examples of both?

484


What are the various restrictions imposed on view in terms of dml?

512


What is the difference between sql, mysql and sql server?

518


How do I view a sql trace file?

551


Are left and right joins the same?

521


Why is the cursor important?

521


What is memory optimized table?

565