1 Reply Latest reply: Dec 8, 2013 9:50 AM by Anar Godjaev RSS

    drop table in the schema

    959406

      Hi

       

      one of the interview question

       

      in this schema contain

       

      schema name  HRR

       

      procedure -10

      function -10

      table 1000

       

      how to detele HRR schema in 1000 table

       

      plz send me command

        • 1. Re: drop table in the schema
          Anar Godjaev

          HI,

           

          If you mean only table:

           

          select 'drop table '||table_name||' cascade constraints;' from all_tables where owner='HRR';

           

          OR

           

          select 'drop table ' || owner || '.' || table_name || ' cascade constraints; ' from all_tables where owner='HRR'

           

           

          Spool the result of this query and execute it...