October 18, 2002 at 1:49 am
To All
Is there a native function in SQL Server 2000 that keeps track of a table data, i.e., it would change if a record is updated, inserted or deleted!
I know I can create a trigger on these events and store the table name and datetime or timestamp in another table, but I was wondering if such a function already there.
Thanks for your help!
October 18, 2002 at 4:30 am
To the best of my knowledge unless undocumented there is no such function or feature already built into the table rows themselves.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
October 18, 2002 at 4:43 am
Not sure if this fits what you're asking, but a timestamp/rowversion column will change each time any part of the row changes. Useful for doing optimistic locking.
Andy
October 18, 2002 at 7:19 am
Yes every time a record is added or updated the timestamp will increase.
So by remembering what the last timestamp was you can very easily check wich columns have been updated
October 18, 2002 at 12:35 pm
Thanks a lot all. I am talking about table level time stamp or marker, not record level. Whenever a table is changed in any way this marker changes.
For example, if you have a lookup table in a a database that is accessed remotely, I would download the table to the client computer and access it from there. During the client log in I would like to check if this table has changed, then I can download.
Thanks again
October 18, 2002 at 3:03 pm
Tables dastetime stamp for creation is not updated in anyway. ANd there is no modified datetime which I have put into MS for request in future version.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
October 18, 2002 at 5:06 pm
Agree. We've got a couple places where we cache data and only want to pull it if changed, eventually built our own versioning scheme - basically we know that once populated for a specific version it will never change, will just get superceded by a newer version.
Andy
October 18, 2002 at 9:26 pm
I was almost certain that there is a function or something that return this info, I just couldn't find it! Thanks for the info, it certainly saved me the extra effort.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply