Identify a table with maximum rows in Oracle

后端 未结 7 1462
猫巷女王i
猫巷女王i 2021-01-13 08:15

I have a set of tables in Oracle and I would like to identify the table that contains the maximum number of rows.

So if, A has 200 rows, B has 345 rows and C has 120

7条回答
  •  日久生厌
    2021-01-13 08:43

    This is a query to get the maximum numbers of rows there in a database table..

    select table_name, num_rows from USER_TABLES
    where num_rows = (select  max(num_rows) from
    (select table_name, num_rows from USER_TABLES));
    

提交回复
热议问题