Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
| Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2007, 11:44 AM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Desc on multiple tables

I am trying to get a listing of all the columns within every table that belong to a certain user.

I can get a listing of the tables using this query.

select OWNER,OBJECT_NAME from all_objects where object_type = 'TABLE' and owner = 'user';

is there anyway to get a 'desc' done on all of the tables that I am retrieving?

 
Old March 2nd, 2007, 08:16 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default


You can generate your own script something like...

select 'DESC ' || OWNER || '.' ||OBJECT_NAME from all_objects where object_type = 'TABLE' and owner = 'user';

the result is a script what you can run

 
Old March 28th, 2007, 08:05 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you should connect to db by sys user.
for example: connect sys/password as sysdba
you run the script,you can get what you want :

SELECT a.owner,a.object_name,a.created,a.last_ddl_time,a. timestamp,a.status
FROM DBA_OBJECTS a
where a.owner in (select distinct owner
                  from dba_objects
                  where owner not in ('SYS','SYSTEM'))
order by a.owner desc;





Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching multiple tables melkin Classic ASP Databases 0 March 10th, 2008 11:48 AM
Joins for multiple tables Jinn SQL Server 2000 2 November 5th, 2006 11:39 PM
Importing Multiple files in Multiple tables Versi Suomi Access 6 June 1st, 2005 08:47 AM
Multiple Recordsets from Multiple Tables TSEROOGY Classic ASP Databases 2 December 28th, 2004 12:45 PM
dataset with multiple tables Bhavin Crystal Reports 2 October 8th, 2004 09:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.