How to find the date and time of last updated table?

Answers were Sorted based on User's Feedback



How to find the date and time of last updated table? ..

Answer / monal

USE TRIGGER OR ADD DATETIMESTAMP COLUMN IN A TABLE WITH
DEFAULT VALUE OF GETDATE()

Is This Answer Correct ?    9 Yes 2 No

How to find the date and time of last updated table? ..

Answer / sanjeev kumar

SELECT OBJECT_NAME(OBJECT_ID) AS tablename,
last_user_update
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'your_database_name')
and user_updates>0
order by last_user_seek desc

Is This Answer Correct ?    3 Yes 0 No

How to find the date and time of last updated table? ..

Answer / smitha

select name,create_date,modify_date from sys.tables
order by modify_date desc

Is This Answer Correct ?    5 Yes 3 No

How to find the date and time of last updated table? ..

Answer / vidit tyagi

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName,
last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'DataBaseName')
AND OBJECT_ID=OBJECT_ID('TableName')

Is This Answer Correct ?    1 Yes 0 No

How to find the date and time of last updated table? ..

Answer / ram

USE TRIGGER OR ADD DATETIMESTAMP COLUMN IN A TABLE WITH
DEFAULT VALUE OF GETDATE()

Is This Answer Correct ?    1 Yes 1 No

How to find the date and time of last updated table? ..

Answer / siddharthapenchala

select scn_to_timestamp(max(ora_rowscn)) from <TN>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Disadvantages of the indexes?

0 Answers  


Describe triggers features and limitations?

0 Answers  


How to delete a database in ms sql server?

0 Answers  


Is index a datbase objects in sql server?

2 Answers  


What is executereader?

0 Answers  






Please get the 4 th maximum salary from a table without using any sql keyword (TOP,MAX are mot allowed)

8 Answers  


What are different types of statement?

0 Answers  


what is the difference between Delete and Truncate

4 Answers   CarrizalSoft Technologies, Geo Research Centre,


Why I am getting this error when dropping a database in ms sql server?

0 Answers  


What is standby servers? Explain types of standby servers.

0 Answers  


Explain different isolation levels?

4 Answers  


what is the Surrogate key?and wt is the diff between Primary key and Surrogate Key?

2 Answers  


Categories