入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

oracle查询用户全部表记录数

创建时间:2014-08-07 投稿人: 浏览次数:113
oracle查询用户所有表记录数

因现场需要升级应用,为安全起见先评估数据量,oracle,一条命令就能搞定。有个需要注意的,需要有DBA权限的用户才行。

 

select TABLE_NAME,NUM_ROWS from dba_all_tables order by num_rows desc

如查询某个用户的:
select TABLE_NAME,NUM_ROWS from dba_all_tables where owner="用户大写" order by num_rows desc
<span style="font-family: Tahoma; font-size: 14px; line-height: 24px;">oracle查询某用户下所有表记录数</span><br style="margin: 0px; padding: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;" /><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;"> </p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;"><span style="margin: 0px; padding: 0px; list-style: none outside none; word-break: normal; word-wrap: break-word;font-size:14px;">查询数据库表信息:</span></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;"> </p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;"> </p><pre class="sql" name="code" style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 14px; line-height: 24px;">select NUM_ROWS,TABLE_NAME from dba_all_tables 

 

select NUM_ROWS,TABLE_NAME from dba_all_tables WHERE OWNER="PIG"


<span style="font-family: Tahoma; font-size: 14px; line-height: 24px;">Oracle 记录表名和表记录数</span><br style="margin: 0px; padding: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;" /><span style="font-family: Tahoma; font-size: 14px; line-height: 24px;">oracle那个系统表同时记录表名和表记录数的?</span><br style="margin: 0px; padding: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;" /><br style="margin: 0px; padding: 0px; font-family: Tahoma; font-size: 14px; line-height: 24px;" /><span style="font-family: Tahoma; font-size: 14px; line-height: 24px;">select table_name , num_rows from user_tables;</span>
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。