Remove all tables for user with one SQl statement?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jan Doggen

    Remove all tables for user with one SQl statement?

    Hi

    How can I remove all tables
    UserName.TblNam 1
    UserName.TblNam 2
    UserName.TblNam 3
    etc

    with one SQL statement?

    Thanks in advance
    Jan


  • HansF

    #2
    Re: Remove all tables for user with one SQl statement?

    1) Newsgroup is obsolete - please use comp.databases. oracle.server'

    2) Is dropping the user at the same time allowed?

    Comment

    • Chuck

      #3
      Re: Remove all tables for user with one SQl statement?

      "Jan Doggen" <j.doggen@BLOCK qsa.nlwrote in news:43a2ee48$0 $11062
      $e4fe514c@news. xs4all.nl:
      Hi
      >
      How can I remove all tables
      UserName.TblNam 1
      UserName.TblNam 2
      UserName.TblNam 3
      etc
      >
      with one SQL statement?
      >
      Thanks in advance
      Jan
      >
      >

      An anonymous PL/SQL block...


      begin
      executute immediate 'drop table UserName.TblNam 1';
      executute immediate 'drop table UserName.TblNam 2';
      executute immediate 'drop table UserName.TblNam 3';
      end;
      /

      Or you could write a "dropalltab les" stored procedure and run that.

      Comment

      Working...