Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2000 Function for record created datetime

Tags:

sql

sql-server

I was given a task to display when a record in the database was added, however the previous developers never made a field for this, and I can't go back and make up dates for all the existing records. Is there an easy way to extract out a record Creation date from a SQL server 2000 query.

SELECT RECORD_CREATED_DATE FROM tblSomething WHERE idField = 1

The RECORD_CREATED_DATE isn't a field in the existing table. Is there some sort of SQL Function to get this information ?

like image 434
stephenbayer Avatar asked Dec 05 '22 07:12

stephenbayer


1 Answers

If it's not stored as a field, the info is lost after the transaction log recycles (typically daily), and maybe even sooner.

like image 136
Joel Coehoorn Avatar answered Jan 05 '23 01:01

Joel Coehoorn