Re: How to drop all views or tables?

From: <hatzinger_m_at_bmwf1f.bmwf.gv.at>
Date: 28 Oct 92 17:29:12 GMT
Message-ID: <1992Oct28.174429.56_at_bmwf1f.bmwf.gv.at>


In article <1992Oct27.193408.5234_at_gdstech.grumman.com>, un_at_gdstech.grumman.com (Un Fu) writes:
> Does anyone know how to drop all views or tables belong
> to a particular user by the particular user (say me)?
> The 'DROP VIEW ...' and 'DROP TABLE ...' commands can
> only remove one view or one table at a time.
>
> Thanks in advance for any help!
>

Write a SQL Script wich creates a "drop" - SQL Script and run it...

  • SQL SCRIPT --------------------------- SET FEEDBACK OFF SET VERIFY OFF SET PAGESIZE 0
SPOOL auto_drop.sql
SELECT 'DROP VIEW '||view_name||';'
  FROM user_views;
SELECT 'DROP TABLE '||table_name||';'
  FROM user_tables;
SPOOL off
start auto_drop.sql
---------------------- END SQL SCRIPT -------------------------


But be carefull.............

kind regards

Mike


                                                                          ^
 Federal Ministry of Science and Research                               B | M
<-------------------------------------------------------------------------+---->
 Computer Center                                                        W | F
                                                                          |
 Klaus-Michael Hatzinger            mail: hatzinger_m_at_bmwf1f.bmwf.gv.at   |
 Bankgasse 1/209                   phone: 0043-222-53120/5188             |
 1014 Vienna, Austria                fax: 0043-222-53120/5155             V
================================================================================
Received on Wed Oct 28 1992 - 18:29:12 CET

Original text of this message