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

Thread: deleting all objects from a schema.

  1. #1
    Join Date
    Aug 2003
    Location
    Virginia
    Posts
    392

    deleting all objects from a schema.

    What easy method would one use to delete all objects from a schema without deleting the user?
    Rick

    Sigh.....those were the days my friend, I thought they'd never end.
    I too remember when this place was coo.


  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    this has been asked so many times you could of searched for it

    spool drop.sql

    select 'drop ' || object_type || ' ' ||object_name|| ';' from user_objects where object_type in ('TABLE', 'INDEX','VIEW','PACKAGE','PROCEDURE','SYNONYM','FUNCTION','SEQUENCE','TRIGGER','TYPE')

    spool off

    @drop.sql

    probably more obejct_types I have missed
    Last edited by davey23uk; 09-20-2003 at 04:22 PM.

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