帮忙解释 一下  
alter table user_a.shop
add constraint person_personid_pk primary key(personid)
deferrable
initial deferred
using index
storeage( initial 300k next 300)
tablespace pioneer_indx
请问问中间的using index时什么意思
书上说
利用using index字句将约束的索引当在不同的表空间中.什么意思???USING INDEX 我只知道Create index temp_idx on temp(partno,warehouse) pctfree 10 tablesapce idx01;接下来创建主键Alter table temp add constraint temp_pk primary key(partno) using index temp_idx;这样可以避免使用两个索引的麻烦 ,也可以节省空间 ,请问问这和上面的问题有关么?????

解决方案 »

  1.   

    using index指定该表使用的索引表空间。
      

  2.   

    You AskedTom,
    When we add a primary key constraint to a table, we use "using index"
    option. What is the purpose for "using index" here. What if we don't 
    give this option.
    My add constraint statement is as following:
    ALTER TABLE SAVED_LIST_ITEM ADD CONSTRAINT
    PK_SAVED_LIST_ITEM PRIMARY KEY
            (LIST_ID,RECORD_ID) 
            USING INDEX
            PCTFREE 10 INITRANS 2 MAXTRANS 255
            STORAGE (INITIAL 512K NEXT 512K MINEXTENTS 1 MAXEXTENTS 505
            PCTINCREASE 0 FREELISTS 6 FREELIST GROUPS 2 BUFFER_POOL DEFAULT)
            TABLESPACE "SCOPUS_INDEX_1M_01"
            ENABLE
    /Thank you very much for you help as always! and we said...it lets you specify the storage options, name, and other attributes of the index that is 
    needed for that constraint.
    alter table t add constraint t_pk primary key(x);will create a unique index, in your default tablespace, using whatever storage parameters 
    are the default for that tablespace.You alter table will create the index in that specified tablespace, with your storage 
    options.
    BTW: use locally managed tablespaces and forget about initial, next, minextents, 
    maxextents, pctincrease all together! 
      

  3.   

    假如不指定
    using index就不能使用下面的语句指定存储选项和表空间
    storeage( initial 300k next 300)
    tablespace pioneer_indx