How can I create a field and function as timestamp in SQL Server

B

BCat

Dear all,

pls help, is there any data type can work as timestamp in mssql server?

Thanks
 
A

Alex Dybenko

Hi,
depends on what you want from this timestamp. to make a "system" timestamp
which help access to locate records - just add a field with type timestamp
if you need a field with date, which shows last update - then add a datetime
field and make a trigger to set this field to current time at any update

--
Best regards,
___________
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
 
Top