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 table only one column how to update rows
i have one table with accounts and amounts as colums.accounts with columns c and d. and amounts with values 1000,2000,3000 for c and 4000,5000,8000 for d.i need to find the sum of these accounts c and d individually and find the differences between their sum using one select statement.
What is sql not null constraint?
Delete duplicate records in the emp table.
What is a sql schema used for?
What is an index and types of indexes. How many number of indexes can be used per table ?
12 Answers Accenture, BirlaSoft, Cognizant, CTS, Symphony,
What is the difference between sum and count in sql?
What is primary and foreign key?
What is mdf ldf and ndf?
What is Histogram?
What is rownum and rowid?
hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews
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)