开发者

What's the created Date-time for Table row in Oracle?

开发者 https://www.devze.com 2023-03-17 16:42 出处:网络
Yesterday my friend -BI Specialist - explained me an oracle problem : there\'s an oracle database that contain huge amount of data but they don\'t make column for each table that store Created datetim

Yesterday my friend -BI Specialist - explained me an oracle problem :

there's an oracle database that contain huge amount of data but they don't make column for each table that store Created datetime for each row.

So i开发者_StackOverflown this case How can he get Created datetime (timestamp) for each row ?


Every row has its own System Change Number (SCN). This is identifying precisely a moment in the database.

First find out the SCN and based on it use SCN_TO_TIMESTAMP to get the time-stamp:

SELECT 
  SCN_TO_TIMESTAMP(ora_rowscn),
  MyTable.*
FROM 
  MyTable
0

精彩评论

暂无评论...
验证码 换一张
取 消