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 |
Why do we need databases?
Can We write bulk collect statement in triggers?
What is sql dialect?
Mention what does plv msg allows you to do?
What are sql queries used for?
Is it important to partition hard disk?
What is rtm stands for?
how can we write a column values horizontal by using sql stmt; ex: select name from table_name;(actual output) a b c d require output is a b c d
5 Answers Honeywell, Interact,
name 3 ways to get an accurate count of the number of records in a table? : Sql dba
How do you write an inner join query?
How many types of normalization are there?
What is pl/sql table? Why it is used?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)