If your table don't have a column for the INSERT timestamp, then you can not get the information.
when when insert row in a table

when a row was inserted into a table on SQL Server?
is it not Nassery date column available of each table
I have 400+ table in a database and
SQL Server Other
1 additional answer
Sort by: Most helpful
-
Anonymous
2023-02-15T01:56:25.35+00:00 If you want to get the insert time, you have to make some changes to the table.
The first is to use timestamps, which need to be implemented by adding a new column to the table.
https://www.geeksforgeeks.org/capturing-insert-timestamp-in-table-sql-server/
The second is a new column, which defaults to System Time.
For example:
create table test(a int,b int,inserttime datetime default getdate()); insert into test(a,b) values(1,4),(25,5); select * from test;
The third method can use triggers. Create a trigger on the table, but the insert time is not displayed in the original table, but in a new table.
https://www.mssqltips.com/sqlservertip/7429/sql-triggers-for-inserts-updates-and-deletes-on-a-table/
If you cannot add columns or create triggers to the original table, you cannot obtain the time information.
Best regards,
Percy Tang
If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.