oracle怎么查询表的行数

 2022-07-19    542  

oracle怎么查询表的行数

语法为:

oracle怎么查询表的行数

select table_name,num_rows from user_tables

在user_tables后面可以添加符合自己的条件,当然如果你有dba权限的话,可以将user_tables换成dba_tables,

num_rows列并不是事实更新的,查新之前最好先ANALYZE下 analyze table 这里写表名compute statistics;

DBA权限下可以查询dba_tables,里面有个num_rows列

select table_name,num_rows from dba_tables where ...;

条件可以根据自己需要来加

num_rows列并不是实时更新的,1小时更新一次。


原文链接:https://77isp.com/post/2110.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。