Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NUM_ROWS column in USER_TABLES view not getting updated

martin75Jan 2 2008 — edited Jan 2 2008

Why is USER_TABLES.NUM_ROWS not getting updated

SQL> CREATE TABLE MYTEST
  2  (ENAME VARCHAR2(15));

Table created.

SQL> INSERT INTO MYTEST VALUES('JOHN');

1 row created.

SQL> INSERT INTO MYTEST VALUES('LORRAINE');

1 row created.

SQL> COMMIT;

Commit complete.

SQL> SELECT NUM_ROWS FROM USER_TABLES WHERE TABLE_NAME='MYTEST';

  NUM_ROWS
----------


SQL> SELECT COUNT(NUM_ROWS) FROM USER_TABLES WHERE TABLE_NAME='MYTEST';

COUNT(NUM_ROWS)
---------------
              0

It should be 2 since i've INSERTed two rows

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2008
Added on Jan 2 2008
5 comments
1,074 views