In Oracle, The OBJECT_ID in the following table is the same as that in DATA_OBJECT_ID.
However, the expression of DATA_OBJECT_ID after truncate changes. This feature can be used to determine whether the table has been truncate.
Note: (database link, FUNCTION, PROCEDURE, SEQUENCE, VIEW) There is no DATA_OBJECT_ID.
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
Connected as report
SQL> SELECT t. table_name, t. last_analyzed, t. num_rows
2 FROM USER_TABLES t
3 WHERE t. table_name = 't2 ';
TABLE_NAME LAST_ANALYZED NUM_ROWS
----------------------------------------------
T2 16:56:17 3
-- OBJECT_ID of T2 is the same as DATA_OBJECT_ID
SQL> SELECT object_name, object_type, object_id, data_object_id
2 FROM USER_OBJECTS
3 WHERE object_name = 't2 ';
OBJECT_NAM OBJECT_TYPE OBJECT_ID DATA_OBJECT_ID
--------------------------------------------------------------
T2-table 75567 75567
SQL> truncate table T2;
Table truncated
SQL> analyze table t2 compute statistics;
Table analyzed
-- After truncate is performed on table T2, The OBJECT_ID is not changed, and the DATA_OBJECT_ID is changed from 75567 to 76592.
SQL> SELECT object_name, object_type, object_id, data_object_id
2 FROM USER_OBJECTS
3 WHERE object_name = 't2 ';
OBJECT_NAM OBJECT_TYPE OBJECT_ID DATA_OBJECT_ID
-----------------------------------------------------
T2-table 75567 76592
SQL>