SQL Server Performance Forum – Threads Archive
How to implement a timestamp using datetime field?The Microsoft timestamp field changes its content whenever row content changes. However the timestamp value is binary and not relevant to time at all. I would like to know how gurus implements the equivalent functionality using a datetime field, using a safe performance-wize approach. The solution should be enforced within the database so that any update is detected (either from an application or from Query Analyzer). This one looks easy, but I see pitfalls for every solution I can think of… Thanks, J-F
quote:Originally posted by dineshasanka http://www.samspublishing.com/articles/article.asp?p=31524&seqNum=6&rl=1
Sorry but this does not answer the question. The TIMESTAMP field has not time information (days, hours, minutes) which can be compared (>, <, BETWEEN). I want to use a DATETIME field and have a mechanism (like a trigger) to update this field everytime something changes in that row.