Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    16

    Unanswered: Question on table partition

    Hi All,

    I have a basic question, excuse me if I sound silly.

    If I drop a table which is partitioned, will all the partions based on the table also will be dropped?

    Thank You,
    namoh.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Question on table partition

    Yes - the partitions are the table. It is easy to see this for yourself:
    PHP Code:
    SQLcreate table parted id intname varchar2(10) )
      
    2  partition by range(id)
      
    3  partition parted1 values less than (1000)
      
    4  partition parted2 values less than (2000)
      
    5  );

    Table created.

    SQLselect partition_name from user_tab_partitions;

    PARTITION_NAME
    ------------------------------
    PARTED2
    PARTED1

    SQL
    drop table parted;

    Table dropped.

    SQLselect partition_name from user_tab_partitions;

    no rows selected 

  3. #3
    Join Date
    Feb 2004
    Posts
    16

    Re: Question on table partition

    Originally posted by andrewst
    Yes - the partitions are the table. It is easy to see this for yourself:
    PHP Code:
    SQLcreate table parted id intname varchar2(10) )
      
    2  partition by range(id)
      
    3  partition parted1 values less than (1000)
      
    4  partition parted2 values less than (2000)
      
    5  );

    Table created.

    SQLselect partition_name from user_tab_partitions;

    PARTITION_NAME
    ------------------------------
    PARTED2
    PARTED1

    SQL
    drop table parted;

    Table dropped.

    SQLselect partition_name from user_tab_partitions;

    no rows selected 
    Thank You very much Tony.
    What if I delete all the rows from parted(main table), the data in the partioned tables will still be there?

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Question on table partition

    No - the partitions are the table! The table is just subdivided into partitions for management purposes, that's all. Deleting a record from the table = delete the record from its partition of the table. The partition is not some separate thing, it is part of the table.

Posting Permissions

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