Oracle数据库–索引

  • A+
所属分类:Oracle

Oracle数据库--索引

1.创建索引

  CREATE INDEX EMP_PHONE_NUMBER_IX  
  ON EMPLOYEES(PHONE_NUMBER);  

2.创建基于函数的索引

  CREATE INDEX EMP_LAST_NAME_IX  
  ON EMPLOYEES(LOWER(LAST_NAME));  

3.索引的使用

  SELECT * FROM EMPLOYEES WHERE LOWER(LAST_NAME)='grant';  

4.索引的删除

  DROP INDEX EMP_LAST_NAME_IX;  

[v_error]不能直接修改索引,想要修改索引,必须删除原来的索引,再新建一个索引。[/v_error]

钰玺

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: