码迷,mamicode.com
首页 > 数据库 > 详细

oracle导不出空表的解决办法

时间:2017-07-21 12:33:39      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:tables   locate   解决办法   alter   ble   compute   order by   语句   acl   

1.先进行表分析(一定要执行此步,否则查询空表可能不准确)

select ‘analyze table ‘||table_name||‘ compute statistics;‘ from user_tables;

2.再查询哪些表是空的(此步可以省略,直接进行第三步)

select table_name from user_tables where NUM_ROWS=0 order by table_name;

3.最后生成alert语句
select ‘alter table ‘||table_name||‘ allocate extent;‘ from user_tables where num_rows=0 order by table_name;

oracle导不出空表的解决办法

标签:tables   locate   解决办法   alter   ble   compute   order by   语句   acl   

原文地址:http://www.cnblogs.com/nsw2018/p/7216915.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!