sqloracle-databaseoracle11goracle-enterprise-manager

Tables with no rows in oracle


When I create any new tables in oracle 11g enterprise manager or sql plus it results in something like this:

-there is no row count (no event zero)

When I insert data to the table by SQL*plus, it says that rows are inserted but when I reconnect by SQL*Plus they all disappear and also the row count in the Enterprise manager still remains blank!

Blank Row Count in Enterprise Manager

I did commit and I also made sure my table is not temporary!

any idea what is the problem?


Solution

  • The row count you are referring to does not reflect actual number of rows in the table. It is a statistic collected by database at regular interval (first being upon table creation). You can refer to last analyzed column which indicates the time when this row count data is collected.

    By default new statistics are collected when there is 10% change in table. You can force stats collection on table using some DBA tools (PL SQL procedures to start stats collection). Note: the data you see in Enterprise Manager is the data avilable DBA_TABLES or USER_TABLES view.

    You can check actual rows on table by issuing below command in sqlplus

    select count(*) from your_table_here;