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

Thread: Can we specify the tablespace for PK?

  1. #1
    Join Date
    May 2001
    Posts
    285
    Since an unique index will be created for PK automatically, can we specify which tablespace that index/PK should go to?

    I tried the syntax

    Alter table xx add constraint pk_xx primary key (col_name) tablespace index_tblsp;

    And got error over there.

    If I don't specify the tablespace when I create PK, then it will go to user's default tablespace. If I create PK inside table creation, then it will go to table's tablespace. Neither of them is what I wanted.

    Any idea?

    TIA...

  2. #2
    Join Date
    Apr 2001
    Posts
    107
    Hi,

    You must add the 'STORAGE' keyword before each storage parameter...

    Hope it helps

    Cheers

    Fabien

  3. #3
    Join Date
    May 2001
    Posts
    285

    Thumbs down That is not true...

    At least when you create tables and indexes, you can specify tablespace directly.

    The question is still here. Anybody have an answer?

  4. #4
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    Yes u can:
    Alter table xx add constraint pk_xx primary key (col_name)
    using index
    tablespace index_tblsp
    pctfree 15
    storage(...); --any needed storage parameters.

  5. #5
    Join Date
    Apr 2001
    Posts
    107
    Shame on me...
    Again too fast in answering.
    Of course, you must set the 'using index ... ...'

    ...
    ...

  6. #6
    Join Date
    May 2001
    Posts
    285

    Thanks!!

    It works now :-)

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