Oracle常用命令----索引

1.creating function-based indexes
sql> create index summit.item_quantity on summit.item(quantity-quantity_shipped);

2.create a B-tree index
sql> create [unique] index index_name on table_name(column,.. asc/desc) tablespace
sql> tablespace_name [pctfree integer] [initrans integer] [maxtrans integer]
sql> [logging | nologging] [nosort] storage(initial 200k next 200k pctincrease 0
sql> maxextents 50);

3.pctfree(index)=(maximum number of rows-initial number of rows)*100/maximum number of rows

4.creating reverse key indexes
sql> create unique index xay_id on xay(a) reverse pctfree 30 storage(initial 200k
sql> next 200k pctincrease 0 maxextents 50) tablespace indx;

5.create bitmap index
sql> create bitmap index xay_id on xay(a) pctfree 30 storage( initial 200k next 200k
sql> pctincrease 0 maxextents 50) tablespace indx;

6.change storage parameter of index
sql> alter index xay_id storage (next 400k maxextents 100);

7.allocating index space
sql> alter index xay_id allocate extent(size 200k datafile 'c:/oracle/index.dbf');

8.alter index xay_id deallocate unused;
------------------------------------------------------------------------------------------------------------
Oracle常用命令----约束

1.define constraints as immediate or deferred
sql> alter session set constraint[s] = immediate/deferred/default;
set constraint[s] constraint_name/all immediate/deferred;

2. sql> drop table table_name cascade constraints
sql> drop tablespace tablespace_name including contents cascade constraints

3. define constraints while create a table
sql> create table xay(id number(7) constraint xay_id primary key deferrable
sql> using index storage(initial 100k next 100k) tablespace indx);
primary key/unique/references table(column)/check

4.enable constraints
sql> alter table xay enable novalidate constraint xay_id;

5.enable constraints
sql> alter table xay enable validate constraint xay_id;

收集Oracle常用命令----索引及约束相关推荐

  1. oracle 常用命令大汇总

    oracle 常用命令大汇总(第一篇) 第一章:日志管理 1.forcing log switches sql> alter system switch logfile; 2.forcing c ...

  2. oracle指令df,​ oracle 常用命令大汇总

    oracle常用命令大汇总 第一章:日志管理 1.forcing log switches sql> alter system switch logfile; 2.forcing checkpo ...

  3. oracle 01035,oracle常用命令(一)

    Oracle常用命令 第一章:日志管理 1.forcing log switches sql> alter system switch logfile; 2.forcing checkpoint ...

  4. Oracle常用命令(一)

    关于Oracle常用命令总结: 第一点:唯一约束.主键约束 alter table ownername.tablename[注:表名] add constraint 字段名_unique[注:索引名] ...

  5. Oracle 常用命令举例

    Oracle 常用命令举例 ? 基本语法 ? % type用法 ? %rowtype用法 ? TYPE用法 ? 游标的使用 ? for 循环 ? loop循环 ? while循环 ? if / els ...

  6. php oracle创建临时表,Oracle常用命令笔记

    Oracle常用命令笔记 客户端用的pl/sql工具 ORACLE的重启命令 (1) 以系统管理员登录,命令:connect / as sysdba (2) 启动数据库,命令:startup (3) ...

  7. linux 上plsql命令_Linux环境Oracle常用命令

    xargs是给命令传递参数的一个过滤器,也是组合多个命令的一个工具.下面这篇文章主要给大家介绍了关于linux中xargs命令用法的相关资料,需要的朋友可以参考借鉴,下面来跟着小编一起看看吧.前言xa ...

  8. Oracle常用命令大全(经典收藏)

    一.ORACLE的启动和关闭  1.在单机环境下  要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下  su - oracle a.启动ORACLE系统  oracle>svr ...

  9. Oracle常用命令大全

    一.ORACLE的启动和关闭 1.在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle>svrmgrl ...

最新文章

  1. TensorFlow基础12-(keras.Sequential模型以及使用Sequential模型 实现手写数字识别)
  2. tomcat server容器解读
  3. 手动建立规则方式创建stream环境
  4. python 之 __new__ 方法理解
  5. 【OpenCV 例程200篇】76. OpenCV 实现图像傅里叶变换
  6. nginx之worker进程个数
  7. 中国水泥板市场趋势报告、技术动态创新及市场预测
  8. 【百度echarts】实现圆环进度条-代码示例代码demo
  9. python 操作进程_python进程简单操作
  10. Doris SQL执行计划
  11. 单片机原理及接口技术c语言版答案,《单片机原理及接口技术》期末考试卷及答案...
  12. 飞鱼星路由器常见问题解答
  13. 阿帕拉契州立大学代表团访问AURAK
  14. Hadoop相关概念
  15. html框架之间空隙,Span之间空隙原因和解决办法
  16. Maven--setting详解
  17. Safari下弹窗被拦截 问题
  18. 服务器操作系统版本号怎么看,服务器怎么看操作系统版本号
  19. GCM 的升级版——FCM(firebase cloud messaging)
  20. C#托管代码和非托管代码的区别

热门文章

  1. U.S.News最新美国大学排名:普林斯顿蝉联总榜第一,MIT领跑计算机,弗罗里达成新贵...
  2. 马斯克成功把人从太空送回地球!历时64天,SpaceX首次载人任务圆满收工
  3. ACL 2020今日放榜,779篇论文被接收,姚班校友陈丹琦首日演讲
  4. 吴文俊AI最高成就奖颁给清华张钹院士,之前曾空缺七年
  5. 让CNN有了平移不变性,同时提升ImageNet成绩:Adobe开源新方法,登上ICML
  6. 算法工程师特大福利 | 不用买云了!这里GPU计算资源免费送!
  7. HttpClient 中文官方教程----第一章基础知识-只收录,未测试
  8. 【Android测试】【第二节】Monkey工具
  9. web socket 心跳包的实现方案
  10. ISA2006之工作组环境下的阵列部署