Last post Jan 11, 2018 03:05 AM by Deepak Panchal
Jan 10, 2018 06:58 AM|Rameezwaheed|LINK
I have multiple tables like
With datetime LastUpdatedon feild Now i have to reterive the last udapted in particular table
LastUpdated on , Table Name
05-JAN-2018 Expereince ,Membership
Please suggest the way
Jan 10, 2018 10:17 AM|Omkar Mhaiskar|LINK
Hi Rameez ,
you can use derived table for both table combined derived tables using join and finally write select statement for fetching records.
So from indivisual you can select lastupdated records with respective column and use this column at uppar select.
Mark As Answer If it helps.
Jan 11, 2018 03:05 AM|Deepak Panchal|LINK
you had mentioned that,"Now i have to reterive the last udapted in particular table"
you can try like below.
SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,*FROM sys.dm_db_index_usage_statsWHERE database_id = DB_ID( 'demo')AND OBJECT_ID=OBJECT_ID('emp')
SQL SERVER – Find Last Date Time Updated for Any Table