Select 'drop table '|| owner || '.' || table_name || ';' from
dba_tables WHERE owner=XYZ
User_tables donot have the column named "Owner".
Hence use dba_tables
Regards
Robertson
-----Original Message-----
From: Ezekiel Filane
[mailto:oracledba-ezmlmshield-x7955895.[Email address protected]
Sent: Tuesday, October 31, 2006 3:20 PM
To: LazyDBA Discussion
Subject: RE: Dropping the tables
Hi Raj
Create a script
Set lines 1200 pages 1200
Spool drop_tables.lst
Select 'drop table '|| owner || '.' || table_name || ';'
from user_tables
WHERE owner=XYZ
/
@drop_tables.lst
Thanks
Ezekiel
-----Original Message-----
From: Raj
[mailto:oracledba-ezmlmshield-x93527208.[Email address protected]
Sent: 31 October 2006 08:49 AM
To: LazyDBA Discussion
Subject: Dropping the tables
Hello All,
Kindly let me know how can we drop all the tables owned by a user
without dropping the user.
Kind regards,
Raj
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
------------------------------------------------------------------------
--------
Please note: This e-mail and its contents are subject to a disclaimer
which can be viewed at http://www.woolworths.co.za/disclaimer. Should
you be unable to access the link please e-mail [Email address protected]
and a copy of the disclaimer will be e-mailed to you.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
www.wipro.com
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page