赞
踩
查看表T是否被截断过:
- SQL> select OBJECT_ID,DATA_OBJECT_ID,OBJECT_NAME from user_objects where OBJECT_NAME = 'T';
-
- OBJECT_ID DATA_OBJECT_ID OBJECT_NAME
- ---------- -------------- -------------------------
- 73463 73463 T
-
- SQL> truncate table t;
-
- 表被截断。
-
- SQL> select OBJECT_ID,DATA_OBJECT_ID,OBJECT_NAME from user_objects where OBJECT_NAME = 'T';
-
- OBJECT_ID DATA_OBJECT_ID OBJECT_NAME
- ---------- -------------- -------------------------
- 73463 73486 T
-
- SQL> truncate table t;
-
- 表被截断。
-
- SQL> select OBJECT_ID,DATA_OBJECT_ID,OBJECT_NAME from user_objects where OBJECT_NAME = 'T';
-
- OBJECT_ID DATA_OBJECT_ID OBJECT_NAME
- ---------- -------------- -------------------------
- 73463 73486 T
-
- SQL> truncate table t;
-
- 表被截断。
-
- SQL> select OBJECT_ID,DATA_OBJECT_ID,OBJECT_NAME from user_objects where OBJECT_NAME = 'T';
-
- OBJECT_ID DATA_OBJECT_ID OBJECT_NAME
- ---------- -------------- -------------------------
- 73463 73486 T
可以看见在表没有被truncate之前,OBJECT_ID和DATA_OBJECT_ID是一样的。在表T被truncate之后,OBJECT_ID和DATA_OBJECT_ID就不一样了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。