Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 last Updated Columns

Author  Topic 

josephjelasker
Starting Member

1 Post

Posted - 2010-03-03 : 03:49:03
Can any one of u pls tell me how to get the latest updated column of a table in sql serve

jelasker

ms65g
Constraint Violating Yak Guru

497 Posts

Posted - 2010-03-03 : 04:17:18
Why do not use OUTPUT clause?
Go to Top of Page

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-03-03 : 05:58:07
Try this... this might help you...

select
t.name, user_seeks ,user_scans ,user_lookups ,user_updates ,last_user_seek ,last_user_scan ,last_user_lookup ,last_user_update
from
sys.dm_db_index_usage_stats i JOIN
sys.tables t ON (t.object_id = i.object_id)
where
t.name like '%dep%' AND database_id = db_id()

Vabhav T
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-03 : 09:14:53
quote:
Originally posted by josephjelasker

Can any one of u pls tell me how to get the latest updated column of a table in sql serve

jelasker


why do you need this?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -