SCN_TO_TIMESTAMP

本文介绍了Oracle数据库中SCN_TO_TIMESTAMP函数的用途及使用方法。该函数能够将系统更改编号(SCN)转换为对应的近似时间戳。文章通过具体实例展示了如何结合ORA_ROWSCN伪列来获取某行最近更改的时间戳。
摘要由CSDN通过智能技术生成

SCN_TO_TIMESTAMP

 

Purpose

SCN_TO_TIMESTAMP takes as an argument a number that evaluates to a system
change number (SCN), and returns the approximate timestamp associated with that
SCN. The returned value is of TIMESTAMP datatype. This function is useful any time
you want to know the timestamp associated with an SCN. For example, it can be used
in conjunction with the ORA_ROWSCN pseudocolumn to associate a timestamp with the
most recent change to a row.

Examples

The following example uses the ORA_ROWSCN pseudocolumn to determine the system
change number of the last update to a row and uses SCN_TO_TIMESTAMP to convert
that SCN to a timestamp:
SELECT SCN_TO_TIMESTAMP(ORA_ROWSCN) FROM employees
WHERE employee_id = 188;

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值