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 |
In a package if we have 10 procedures or functions,How to know which will execute first?
What is the use of procedures?
What is dense_rank?
What is the example of procedure?
Can there be more than one function with a similar name in a pl/sql block?
Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance Suneel Reddy
How pl/sql source code can be protected?
What is pivot in sql?
What is normalization in a database?
What is rollback?
how to shutdown mysql server? : Sql dba
How do I kill a query in postgresql?