zoukankan      html  css  js  c++  java
  • oracle中的索引查看

    1、创建索引  create index 索引名 on 表名(列名);

    2、删除索引  drop index 索引名;

     3、创建组合索引  create index 索引名 on 表名(列名1,,列名2);

    --在数据库中查找表名
    select * from user_tables where  table_name like 'tablename%';
     --查看该表的所有索引(注意后面表名称大写,小写查询不到)
    select * from all_indexes where table_name = 'tablename';
     --查看该表的所有索引列
    select* from all_ind_columns where table_name = 'tablename';
    mysql表中的索引使用 show index from ‘table’;但是oracle中不适用。
    oracle中表的索引信息存在 user_indexes 和 user_ind_columns 两张表里面,
    其中,
    user_indexes 系统视图存放是索引的名称以及该索引是否是唯一索引等信息,
    user_ind_columns 统视图存放的是索引名称,对应的表和列等

     



  • 相关阅读:
    Prometheus监控k8s集合
    docker集合
    开源堡垒机jumpserver
    ELK日志分析平台
    安全名称解释
    CPU上下文切换
    平均负载
    234. 回文链表
    125. 验证回文串
    122. 买卖股票的最佳时机II
  • 原文地址:https://www.cnblogs.com/zouhong/p/12977361.html
Copyright © 2011-2022 走看看