删除索引

来源:互联网 发布:摄乎大国之间的摄 编辑:程序博客网 时间:2024/05/16 07:22
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
8.4.1 用Enterprise Manager 删除索引
在Enterprise Manager 中可以从如图8-9 所示的索引管理对话框或如图8-14 所示的表的属性对话框中选择要删除的索引,再选“Delete” 按钮来删除索引
8.4.2 用DROP INDEX 命令删除索引

DROP INDEX 命令可以删除一个或多个当前数据库中的索引。其语法如下:
DROP INDEX 'tablename.indexname' [,...n]
DROP INDEX 命令不能删除由CREATE TABLE 或ALTER TABLE 命令创建的PRIMARY KEY 或UNIQUE 约束索引。也不能删除系统表中的索引。

例8-6: 删除表products 中的索引p_quantity。
drop index products1.p_quantity
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击