DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: DELETE ALL VIEWS ???

  1. #1
    Join Date
    Nov 2000
    Posts
    198
    how can I delete all views in my database in ONE step.

    thanks,

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    spool script.sql
    select 'drop view ' || owner || '.' || view_name
    from dba_views;
    spool off
    spool script.log
    @ script.sql
    spool off

  3. #3
    Join Date
    Nov 2000
    Posts
    198
    thanks very much,

    I am using this settings to get red off the headings and
    feedback and the rest of the junk, but it is not working !!

    set heading off;
    set feedback off;
    set echo off;
    set termout off;
    set scan off;

    I keep getting this

    SQL> select 'drop table ' || table_name||';'
    2 from user_tables

    drop table test;
    drop table test1;

    SQL>spool off;

    any idea???
    thanks again

  4. #4
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    well, as far as I know, you cannot prevent the query and the spool off from being in the spooled file ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width