pl/sql编程(三)

1.唯一索引的创建 

create unique index uq_goodsid on goods (goodsid)

2.强制使用索引

select /*+ index(goods uq_goodsid)*/* from goods

3.复合索引的创建

create index ind_suid_goodsid on su (suid,goodsid)

4.查看索引

select * from user_indexes where table_name = 'SU'

或者

select * from all_indexes where table_name = 'SU'

5.重命名索引

alter index ind_suid_goodsid rename to ind_suid_goodsid2

6.重建索引

alter index ind_suid_goodsid2 rebuild

7.删除索引

drop index ind_suid_goodsid2

 

 

你可能感兴趣的:(pl/sql)