Oracle創建表和索引的語句寫法是比較基礎的知識,下面就為您詳細介紹Oracle創建表和索引的方法,希望對您學習Oracle創建表方面能有所幫助。
Oracle創建表
- create table tablename
- (
- f1 NUMBER(10) not null,
- f2 NUMBER(10) null ,
- f3 NUMBER(3) defalut 0,
- pt number(3) not null ,
- constraint PK_tablename primary key (f1)
- using index
- tablespace ts_name
- storage
- (
- initial 1m
- next 1m
- pctincrease 0
- )
- )
- pctfree 10
- tablespace ts_name
- storage
- (
- initial 1m
- next 1m
- pctincrease 0
- )
- partition by range(pt)
- (partition part000 values less than (1) tablespace ts_name,
- partition part001 values less than (2) tablespace ts_name,
- )
- /
創建索引
- create index i_tablename1 on tablename(f2)
- tablespace ts_name
- storage
- (
- initial 500k
- next 500k
- pctincrease 0
- )