May 22, 2006 at 1:28 am
Hi,
I want to know the date when a row updated in a table. I dont want to add one more column updated_on in my table.
Any idea?
Thanks in advance
Ramaa
May 22, 2006 at 2:15 am
Rama,
unless you record this date (either in a column in the table, or in another table) you won't be able to know when a row was updated.
This is unless you choose to implement C2 auditing (have a look in BOL for C2 auditing). I'd recommend against this though unless you have very good reasons for using auditing as it can place a lot of overhead on the system.
Other than that, unless you've got access to a third-party tool, you're stuck with manually recording the date a row was updated by using triggers and an updated_on column (either in the same table or another table).
May 22, 2006 at 2:42 am
Hi Karl,
Thank you very much for your reply.
Ramaa
May 22, 2006 at 8:01 am
There is one way.......create an UPDATE trigger that returns the date and time to a file. It can also return the row that got updated if that's what you need or just the row id/primary key if there is one.
-SQLBill
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply