If you want to know when a record was last update, you should maintain a lastupdate column is table and update the value with current datetime everytime the record is updated
0
Raja TRank #685 · 3.5K reputationPosted Jul 27, 2016, 2:57 AM EDT
0
Hi, In your table structure any field is available created date /modified date ?
or
check it like
SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,* FROM sys.dm_db_index_usage_stats WHERE database_id = DB_ID( 'AdventureWorks') --Here ur db name AND OBJECT_ID=OBJECT_ID('test') --Here ur table name
Rajeesh MenothRank #118 · 18.4K reputationPosted Jul 27, 2016, 3:54 AM EDT
Midhun TpRank #388 · 6.5K reputationPosted Jul 27, 2016, 2:52 AM EDT
JohnRank #2,322 · 608 reputationPosted Jul 27, 2016, 2:57 AM EDT
Raja TRank #685 · 3.5K reputationPosted Jul 27, 2016, 2:57 AM EDT
SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,*FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'AdventureWorks') --Here ur db name
AND OBJECT_ID=OBJECT_ID('test') --Here ur table name
Midhun TpRank #388 · 6.5K reputationPosted Jul 27, 2016, 3:40 AM EDT
Kavi Nithyasri39 reputationPosted Jul 27, 2016, 7:24 AM EDT
Raja TRank #685 · 3.5K reputationPosted Jul 27, 2016, 8:16 AM EDT
Vasanth NatarajanRank #3,352 · 429 reputationPosted Aug 5, 2016, 6:10 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts