How to find the date and time of last updated table?
Answers were Sorted based on User's Feedback
Answer / monal
USE TRIGGER OR ADD DATETIMESTAMP COLUMN IN A TABLE WITH
DEFAULT VALUE OF GETDATE()
| Is This Answer Correct ? | 9 Yes | 2 No |
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 |
Answer / smitha
select name,create_date,modify_date from sys.tables
order by modify_date desc
| Is This Answer Correct ? | 5 Yes | 3 No |
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 |
Answer / ram
USE TRIGGER OR ADD DATETIMESTAMP COLUMN IN A TABLE WITH
DEFAULT VALUE OF GETDATE()
| Is This Answer Correct ? | 1 Yes | 1 No |
select scn_to_timestamp(max(ora_rowscn)) from <TN>
| Is This Answer Correct ? | 0 Yes | 0 No |
what are the critical issues you have resloved in your company
what are the limitations of parameters in a storedprocedure
What is a database in ms sql server?
Explain aggregate functions?
How sql server executes a statement with nested subqueries?
What stored by the master?
i need to know how i display department which has salary > =5000 for the below table Department ----------- salary deptname 1000 a 3000 a 2000 b 3000 b 4000 c 5000 c kindly send the query to thilakvinoth13@gmail.com
What is ms sql server service broker?
what stored procedure would you use to view lock information? : Sql server administration
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
What is the new security features added in sql server 2016? : sql server security
user defined datatypes
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)