Showing posts with label DML. Show all posts
Showing posts with label DML. Show all posts

Wednesday, January 7, 2015

Finding INSERT, UPDATE, DELETE rows in table from oracle database.

EXECUTE DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;

This procedure flushes in-memory monitoring information for all tables in the dictionary. Corresponding entries in the *_TAB_MODIFICATIONS views are updated immediately, without waiting for the Oracle database to flush them periodically.


  SELECT TABLE_OWNER,
         TABLE_NAME,
         INSERTS,
         UPDATES,
         DELETES,
         TRUNCATED,
         (CASE WHEN DROP_SEGMENTS = 1 THEN 'YES' ELSE 'NO' END) DROPED,
         TIMESTAMP
    FROM DBA_TAB_MODIFICATIONS
   WHERE TABLE_OWNER = USER
ORDER BY TABLE_NAME