In Oracle, "num_rows" and "user_tables" can be used to query the number of rows in the table. The "num_rows" column is updated once an hour. The syntax is "select table_name,num_rows from user_tables where condition".
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
The syntax is:
select table_name,num_rows from user_tables
You can add your own conditions after user_tables. Of course, if you have dba authority, you can add user_tables Change to dba_tables,
num_rows column is not actually updated. Before checking, it is best to ANALYZE analyze table and write the table name compute statistics here;
You can query dba_tables under DBA authority, which contains A num_rows column
select table_name,num_rows from dba_tables where ...;
The conditions can be added according to your own needs
The num_rows column is not updated in real time and is updated once an hour.
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to query the number of rows in a table in oracle. For more information, please follow other related articles on the PHP Chinese website!