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 / payal nath

We can determine the last time a user table was altered
using the below query.

SELECT name, create_date, modify_date
FROM sys.tables
ORDER BY modify_date DESC

The modify_date column is updated whenever a column is
added or altered for the table.
It is also updated if the clustered index is changed.

Is This Answer Correct ?    8 Yes 3 No

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

Answer / manoj

select table_name from user_tables where last_analyzed in
(select max(last_analyzed) from user_tables)

Is This Answer Correct ?    4 Yes 2 No

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

Answer / manoj

select table_name, to_char(last_analyzed, 'DD-MM-YY
HH:MI:SS') from user_tables where last_analyzed in (select
max(last_analyzed) from user_tables)

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL Server Interview Questions

Which virtual table does a trigger use?

8 Answers   TCS,


How to add additional conditions in SQL?

0 Answers   Amdocs,


what is normalization? what is denormalization?

9 Answers   Satyam,


What is failover clustering overview?

0 Answers  


how to copy sysdatabase file from c: Drive to D: Drive in SQL Server.

6 Answers   IBM,






Which sql server table is used to hold the stored procedure script?

0 Answers  


Explain syntax for disabling triggers?

0 Answers  


WHICH INDEX IS FAST CLUSTER AND NON CLUSTER INDEX

4 Answers   CarrizalSoft Technologies, L&T,


what is meant by sql injection with example and one more question how to catch the errors in sqlserver

2 Answers  


What is de-normalization and what are some of the examples of it?

0 Answers  


Do you know what are the restrictions that views have to follow?

0 Answers  


Can primary key be null?

0 Answers  


Categories