How to perform a loop through all tables in pl/sql?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Answer / mahesh gulati
select * from sysobjects where type = 'u'
Is This Answer Correct ? | 3 Yes | 7 No |
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
What is sql query limit?
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?
What is loop in pl sql?
What is bulk collections?
Describe the Index, Types of index, At what situation we have used? Which one s better than others?
What does cursor do in sql?
What is the maximum number of triggers,can apply to a single table?
what is the difference between sql and t-sql? : Transact sql
what is transaction? : Sql dba
How to find only %th Highest Sal