TIME STAMP

Hi

 Can somebody pls tell me what is TimeStamp datatype in SQL Server.

Thanks

ASPNET_8Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ReubenwelshCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AlokJain0412Commented:
timestamp

Is used to indicate the sequence of SQL Server activity on a row, represented as an increasing number in a binary format. As a row is modified in a table, the timestamp is updated with the current database timestamp value obtained from the @@DBTS function. timestamp data is not related to the date and time of an insert or change to data. To automatically record times that data modifications take place in a table, use either a datetime or smalldatetime data type to record the events and triggers.

Note  In SQL Server, rowversion is a synonym for timestamp.

timestamp variables are automatically populated by SQL Server with the time that a row is created or modified. The timestamp value is based upon an internal clock and does not correspond to real time. Each table may have only one timestamp variable.

You can  Understand By this example
CREATE TABLE [dbo].[tamstamptable](
      [c1] [int] NOT NULL,
      [c2] [int] NOT NULL
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[tamstamptable] ADD  CONSTRAINT [DF_tamstamptable_c1]  DEFAULT (@@dbts) FOR [c1]
GO




select * from [dbo].[tamstamptable]

insert [dbo].[tamstamptable](c2)
Values(2)
0
ASPNET_8Author Commented:
Good
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server Apps

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.