How to get created time of record in oracle?

by filiberto , in category: MySQL , 7 months ago

How to get created time of record in oracle?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by muriel.schmidt , 7 months ago

@filiberto 

You can get the creation time of a record in Oracle by using the pseudo column ORA_ROWSCN. This column contains the system change number (SCN) of the most recent change to a row and can be used to determine the approximate time when the row was created.


Here is an example query to retrieve the creation time of a record:

1
2
3
SELECT SCN_TO_TIMESTAMP(ORA_ROWSCN) AS creation_time
FROM your_table
WHERE your_condition;


This query will return the creation time of the record based on the ORA_ROWSCN value. Keep in mind that ORA_ROWSCN is an approximate value and may not be 100% accurate in all cases.

Related Threads:

How to get system date and time in oracle sql?
How to get the time in ping?
How to use a defined record in oracle?
How to get values for time intervals of hours in one day in sparql?
How to return multiple records from single record in oracle?
How to get latest activity record in laravel?