龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > Oracle 技术 >

Oracle创建表和索引

时间:2011-04-12 23:18来源:未知 作者:admin 点击:
分享到:
Oracle创建表和索引的语句写法是比较基础的知识,下面就为您详细介绍 Oracle 创建表和索引的方法,希望对您学习Oracle创建表方面能有所帮助。 Oracle创建表 createtabletablename ( f1NUMBER(10)

Oracle创建表和索引的语句写法是比较基础的知识,下面就为您详细介绍Oracle创建表和索引的方法,希望对您学习Oracle创建表方面能有所帮助。

Oracle创建表

  1. create table tablename  
  2. (  
  3. f1 NUMBER(10) not null,  
  4. f2 NUMBER(10) null ,  
  5. f3 NUMBER(3) defalut 0,  
  6. pt number(3) not null ,  
  7. constraint PK_tablename primary key (f1)  
  8. using index  
  9. tablespace ts_name  
  10. storage  
  11. (  
  12. initial 1m  
  13. next 1m  
  14. pctincrease 0  
  15. )  
  16. )  
  17. pctfree 10  
  18. tablespace ts_name  
  19. storage  
  20. (  
  21. initial 1m  
  22. next 1m  
  23. pctincrease 0  
  24. )  
  25. partition by range(pt)  
  26. (partition part000 values less than (1) tablespace ts_name,  
  27. partition part001 values less than (2) tablespace ts_name,  
  28. )  

创建索引

  1. create index i_tablename1 on tablename(f2)  
  2. tablespace ts_name  
  3. storage  
  4. (  
  5. initial 500k  
  6. next 500k  
  7. pctincrease 0  

教您如何实现Oracle重建索引

Oracle COMMIT语句的处理顺序介绍

全面解析Oracle文件系统

当前Oracle系统时间的查询方法

ORACLE系统表和数据字典视图

精彩图集

赞助商链接