Oracle数据库 all_tab_modifications

all_tab_modifications

ALL_TAB_MODIFICATIONS 属于 Oracle Data Dictionary 视图,它储存了每张表被编辑过的操作信息,包括 DDL(数据定义语言)和 DML(数据操纵语言)操作,例如表的创建、更改、修改、删除等行为。它可以根据用户指定的参数信息来查询指定的表的变更信息。

SELECT * FROM ALL_TAB_MODIFICATIONS WHERE TABLE_NAME = '表名';

在我们想查看某张表的变更信息时,可以使用 ALL_TAB_MODIFICATIONS 视图查询结果,本质是运行SQL语句查询相应表的变更历史信息,可以获取到更新和删除前后的数据,查询结果包括TABLE_NAME(表名),OPERATION(操作类型),TIMESTAMP(变更时间),USERNAME(操作用户),CTIME(创建时间)等信息。

ALL_TAB_MODIFICATIONS describes tables accessible to the current user that have been modified since the last time statistics were gathered on the tables.

Related Views:

  • DBA_TAB_MODIFICATIONS describes such information for all tables in the database.
  • USER_TAB_MODIFICATIONS describes such information for tables owned by the current user. This view does not display the TABLE_OWNER column.
ColumnDatatypeNULLDescription
TABLE_OWNERVARCHAR2(128)Owner of the modified table
TABLE_NAMEVARCHAR2(128)Name of the modified table
PARTITION_NAMEVARCHAR2(128)Name of the modified partition
SUBPARTITION_NAMEVARCHAR2(128)Name of the modified subpartition
INSERTSNUMBERApproximate number of inserts since the last time statistics were gathered
UPDATESNUMBERApproximate number of updates since the last time statistics were gathered
DELETESNUMBERApproximate number of deletes since the last time statistics were gathered
TIMESTAMPDATEIndicates the last time the table was modified
TRUNCATEDVARCHAR2(3)Indicates whether the table has been truncated since the last analyze (YES) or not (NO)
DROP_SEGMENTSNUMBERNumber of partition and subpartition segments dropped since the last analyze
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值