Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2010
    Posts
    33

    Question Unanswered: Drop all table at once - query

    Hi,

    Is there a command to drop all the tables created by one user ? I Believe we can get the list from the SYSIBM.SYSTABLES and generate a DROP command to remove all the tables from the Tablespace, but Just looking for a command to perform a mass drop of tables created by one user.

    Could anyone please assist me on the above.

    Jaggz

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    You can drop all objects from one schema using
    CALL SYSPROC.ADMIN_DROP_SCHEMA(‘MYSCHEMA1’,NULL,’DROPSC HEMA’,’ERRORMSGS’)

    But, there isn't anything to drop tables created by a user. You can of course use the above if the user has created the tables in a seperate schema.

    Refer documentation for more details.

    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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