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 ?    4 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 6 No

Post New Answer



More SQL PLSQL Interview Questions

What packages(if any) has oracle provided for use by developers?

1 Answers  


IF i write before / after insert / update trigger and i do rollback what will happen?

5 Answers   KPIT,


What is the Difference between Procedure and Function.Can we call a Function in a DML?

2 Answers   TCS,


HOW TO TUNE ORACLE SQL QUERIES GIVE ME STEP BY SREP

1 Answers   TCS,


What are the key differences between SQL and PL SQL?

0 Answers  






a procedure one in two out parameters i am waiting it in a sql query can i get the output

1 Answers  


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

4 Answers   MBT, Evosys,


can we use out parameter in a function?Give an example.

4 Answers   TCS, Logica CMG,


we have a package and we have grants to execute that package inside of that we have table, here we don't have privileges to this table? whether this package will execute or not?

3 Answers   TCS,


Difference between aggregate function and analytical function?

3 Answers   Metric Stream,


what are Dynamic SQL statements?

9 Answers  


How to trace the errors in pl/sql block code?

5 Answers   TCS,






Categories