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
what is cross join? : Sql dba
What is package in pl sql?
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.
Are stored procedures faster than dynamic sql?
how to write date and time literals? : Sql dba
How does cross join work in sql?
What's the procedure?
Explain unique key in sql.
What are inner and outer joins examples of both?
What are the various restrictions imposed on view in terms of dml?
What is the difference between sql, mysql and sql server?
How do I view a sql trace file?
Are left and right joins the same?
Why is the cursor important?
What is memory optimized table?