如何查找没有建立索引的表

[复制链接]
查看11 | 回复4 | 2011-11-1 16:26:59 | 显示全部楼层 |阅读模式
有没有哪个SQL语句可以查询出哪些表没有建立索引的?
回复

使用道具 举报

千问 | 2011-11-1 16:26:59 | 显示全部楼层
user_tables.table_name not in
user_indexes.table_name
回复

使用道具 举报

千问 | 2011-11-1 16:26:59 | 显示全部楼层
有没有完整的SQL语句啊?
回复

使用道具 举报

千问 | 2011-11-1 16:26:59 | 显示全部楼层
当前登陆用户下面:没有索引的table
select tname from tab where tname not in (select distinct table_name from user_indexes)
你可以试一试
回复

使用道具 举报

千问 | 2011-11-1 16:26:59 | 显示全部楼层
原帖由 mingdaoblack 于 2011-9-1 16:50 发表
有没有完整的SQL语句啊?

好好补补sql基础吧
select table_name from user_tables where table_name not in(select distinct table_name from user_indexes)
[ 本帖最后由 xifenfei 于 2011-9-2 09:27 编辑 ]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行