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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / rahul name

We can use user_tables view of data dictionary.
create a cursor based on query
select * from user_tables and then use use this cursor
in for loop

Is This Answer Correct ?    3 Yes 4 No

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

Answer / highness

I got a lot of definitions for this but i thing this is right

A compiled plsql procedure
stands for a stored procedure...

check out this

Is This Answer Correct ?    1 Yes 2 No

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

Answer / mahesh gulati

select * from sysobjects where type = 'u'

Is This Answer Correct ?    3 Yes 7 No

Post New Answer

More SQL PLSQL Interview Questions

Hi all, i have a table as follows empid empname mgrid deptid 1 a 3 4 2 b 1 5 3 c 2 3 4 d 3 6 5 e 4 7 i want the output as empname mgrname a c b a c b d c e d

4 Answers  


What is sql query limit?

0 Answers  


wt is the diff b/w greast and max ,least and min? wt is the diff b/w case and decod?

4 Answers   Oracle, TCS, Tecnics,


What are sql commands?

0 Answers  


What is loop in pl sql?

0 Answers  






What is bulk collections?

2 Answers  


Describe the Index, Types of index, At what situation we have used? Which one s better than others?

1 Answers   IBM, TCS,


What does cursor do in sql?

0 Answers  


What is the maximum number of triggers,can apply to a single table?

2 Answers  


what is the difference between sql and t-sql? : Transact sql

0 Answers  


what is transaction? : Sql dba

0 Answers  


How to find only %th Highest Sal

6 Answers   Infogain, Symphony,


Categories