您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

oracle怎么查询表的行数

2025/8/8 10:37:35发布33次查看
在oracle中,可用“num_rows”和“user_tables”来查询表的行数,“num_rows”列一小时更新一次,语法为“select table_name,num_rows from user_tables where 条件”。
本教程操作环境:windows10系统、oracle 11g版、dell g3电脑。
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小时更新一次。
推荐教程:《oracle视频教程》
以上就是oracle怎么查询表的行数的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product