Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
how to insert a value into column of the type timestamp
X002548
Not Just a Number
15586 Posts
Posted - 2004-04-09 : 10:39:22
Don't think you can...never used them...check out BOL..seems like the concept might be changing (finally)
USE NorthwindGOCREATE TABLE myTable99 (Col1 int PRIMARY KEY, Col2 timestamp)GOINSERT INTO myTable99(Col1) SELECT 1SELECT * FROM myTable99--INSERT INTO myTable99(Col1,Col2) SELECT 1,0DROP TABLE myTable99GO
Brett8-)
derrickleggett
Pointy Haired Yak DBA
4184 Posts
Posted - 2004-04-09 : 15:15:53
You can't. What would be the purpose of that? You can insert into a datetime field with is the T-SQL equivalant of the ANSI timestamp. The timestamp just automatically records when a row was last inserted or updated. Since it's a pure audit field, the ability to update it would defeat the purposeMeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA.