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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Last Update Record

Author  Topic 

f.gehan
Starting Member

1 Post

Posted - 2012-03-03 : 11:18:15
Hi Guys

I have SQL Data table with hundred thousand records, if someone modified record I want to find out what is the last modified record through SQL query, is there any SQL function to find this?

Sachin.Nand

2937 Posts

Posted - 2012-03-03 : 11:59:04
By default there is no way to query the changes.You will have to enable CDC or set up Auditing on your database.


After Monday and Tuesday even the calendar says W T F ....
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-04 : 15:06:04
do you've audit column like update_date,modified_date,created_date etc in your table?

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

Go to Top of Page

noamg
Posting Yak Master

215 Posts

Posted - 2012-03-05 : 10:54:10
can you add a column with datatype timestamp ?
the last update include the max( column_timestamp )


Noam Graizer
Go to Top of Page
   

- Advertisement -