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,
)
/
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
创建索引
create index i_tablename1 on tablename(f2)
tablespace ts_name
storage
(
initial 500k
next 500k
pctincrease 0
)
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
【编辑推荐】